From f7594b577442edff83b6b3127f12a6c8a0d525d0 Mon Sep 17 00:00:00 2001 From: TonyWang222 Date: Fri, 19 Aug 2022 17:01:14 +0800 Subject: [PATCH] support gn build Signed-off-by: sunsuodong Change-Id: I4c1d7732697ee25e394edcef5638e6741bbe638f --- .gitignore | 2 - include/api/delegate.h | 2 +- .../cpu/nnacl/infer/common_infer.c | 2 +- .../cpu/nnacl/infer/infer_register.c | 6 - .../cpu/nnacl/infer/infer_register.h | 5 - mindspore/core/mindrt/include/actor/msg.h | 2 +- mindspore/lite/include/context.h | 2 +- .../lite/src/common/dynamic_library_loader.cc | 4 - mindspore/lite/src/cxx_api/converters.cc | 189 +++++++++++------- mindspore/lite/src/inner_kernel.h | 12 -- .../lite/src/ops/populate/adam_populate.cc | 2 +- .../kernel/arm/fp32/arithmetic_fp32.cc | 16 +- .../runtime/kernel/arm/fp32/arithmetic_fp32.h | 2 +- .../fp32/convolution_depthwise_3x3_fp32.cc | 4 +- .../arm/fp32/convolution_depthwise_3x3_fp32.h | 2 +- .../arm/fp32/convolution_depthwise_fp32.cc | 4 +- .../arm/fp32/convolution_depthwise_fp32.h | 2 +- .../convolution_depthwise_indirect_fp32.cc | 4 +- .../convolution_depthwise_indirect_fp32.h | 2 +- .../convolution_depthwise_slidewindow_fp32.cc | 4 +- .../convolution_depthwise_slidewindow_fp32.h | 2 +- .../arm/fp32/deconvolution_depthwise_fp32.cc | 4 +- .../arm/fp32/deconvolution_depthwise_fp32.h | 2 +- .../arm/fp32/non_max_suppression_fp32.h | 21 +- .../int8/convolution_depthwise_3x3_int8.cc | 4 +- .../arm/int8/convolution_depthwise_3x3_int8.h | 2 +- .../arm/int8/convolution_depthwise_int8.cc | 4 +- .../arm/int8/convolution_depthwise_int8.h | 2 +- .../convolution_depthwise_slidewindow_int8.cc | 4 +- .../convolution_depthwise_slidewindow_int8.h | 2 +- .../arm/int8/deconvolution_depthwise_int8.cc | 4 +- .../arm/int8/deconvolution_depthwise_int8.h | 2 +- 32 files changed, 163 insertions(+), 158 deletions(-) diff --git a/.gitignore b/.gitignore index 9a0fc86472..0d69bb0b17 100644 --- a/.gitignore +++ b/.gitignore @@ -25,8 +25,6 @@ mindspore/lite/tools/converter/parser/onnx/onnx.pb.h mindspore/lite/tools/converter/parser/onnx/onnx.pb.h mindspore/lite/tools/converter/schema/*.h mindspore/lite/tools/converter/schema/inner -mindspore/lite/schema/*.h -mindspore/lite/schema/inner mindspore/lite/src/runtime/kernel/opencl/cl/fp16/*.inc mindspore/lite/src/runtime/kernel/opencl/cl/fp32/*.inc diff --git a/include/api/delegate.h b/include/api/delegate.h index 4c1b28f988..8a2ece9697 100644 --- a/include/api/delegate.h +++ b/include/api/delegate.h @@ -81,7 +81,7 @@ class MS_API DelegateModel { /// \brief Get the ms model version. /// /// \return The schema version for the primitives map. - const SchemaVersion GetVersion() { return version_; } + SchemaVersion GetVersion() const { return version_; } protected: std::vector *kernels_; diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c index fc943ed8cc..cd7f8a9f25 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c @@ -17,7 +17,7 @@ #include #include #include "nnacl/infer/infer_register.h" -#include "backend/kernel_compiler/cpu/nnacl/op_base.h" +#include "nnacl/op_base.h" #ifndef CONTROLFLOW_TENSORLIST_CLIP int MallocTensorListData(TensorListC *tensor_list, TypeIdC dtype, const vvector *tensor_shape) { diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.c b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.c index 1444dea477..2e9f6316d6 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.c +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.c @@ -15,7 +15,6 @@ */ #include "nnacl/infer/infer_register.h" -#ifdef _MSC_VER #include "nnacl/infer/adam_infer.h" #include "nnacl/infer/add_sub_grad_infer.h" #include "nnacl/infer/addn_infer.h" @@ -350,18 +349,13 @@ void RegAllInferFunc3() { g_infer_func[PrimType_ScatterNdUpdate] = ScatterNdUpdateInferShape; } -#else -__attribute__((init_priority(101))) InferShape g_infer_func[PrimType_MAX * sizeof(InferShape)] = {0}; -#endif // _MSC_VER InferShape GetInferFunc(int prim_type) { -#ifdef _MSC_VER if (g_infer_func[PrimType_Abs] == NULL) { RegAllInferFunc1(); RegAllInferFunc2(); RegAllInferFunc3(); } -#endif if (prim_type < PrimType_MAX) { return g_infer_func[prim_type]; } diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.h b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.h index e3da4f3f8c..061026607f 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.h +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.h @@ -231,12 +231,7 @@ enum PrimType { void RegInfer(int prim_type, InferShape func); -#ifdef _MSC_VER #define REG_INFER(op, type, func) -#else -#define REG_INFER(op, type, func) \ - __attribute__((constructor(102))) void Reg##op##Infer() { RegInfer(type, func); } -#endif #ifdef __cplusplus } diff --git a/mindspore/core/mindrt/include/actor/msg.h b/mindspore/core/mindrt/include/actor/msg.h index 8fc5bec452..42898475dd 100644 --- a/mindspore/core/mindrt/include/actor/msg.h +++ b/mindspore/core/mindrt/include/actor/msg.h @@ -66,7 +66,7 @@ class MessageBase { inline void SetTo(const AID &aTo) { to = aTo; } - inline const Type GetType() const { return type; } + inline Type GetType() const { return type; } inline void SetType(Type eType) { type = eType; } diff --git a/mindspore/lite/include/context.h b/mindspore/lite/include/context.h index c9a21399b8..610a8272b7 100644 --- a/mindspore/lite/include/context.h +++ b/mindspore/lite/include/context.h @@ -68,7 +68,7 @@ struct Context { Vector affinity_core_list_; /**< explicitly specify the core to be bound. priority use affinity core list */ AllocatorPtr allocator = nullptr; #ifndef NOT_USE_STL - DeviceContextVector device_list_ = {{DT_CPU, {false, MID_CPU}}}; + DeviceContextVector device_list_ = {{DT_CPU, {{false, MID_CPU}}}}; #else DeviceContextVector device_list_; #endif // NOT_USE_STL diff --git a/mindspore/lite/src/common/dynamic_library_loader.cc b/mindspore/lite/src/common/dynamic_library_loader.cc index c380b08dce..d27705dfbc 100644 --- a/mindspore/lite/src/common/dynamic_library_loader.cc +++ b/mindspore/lite/src/common/dynamic_library_loader.cc @@ -35,11 +35,7 @@ int DynamicLibraryLoader::Open(const std::string &lib_path) { std::string real_path = RealPath(lib_path.c_str()); #ifndef _WIN32 -#ifndef ENABLE_ARM - handler_ = dlopen(real_path.c_str(), RTLD_LAZY | RTLD_DEEPBIND); -#else handler_ = dlopen(real_path.c_str(), RTLD_LAZY); -#endif #else handler_ = LoadLibrary(real_path.c_str()); #endif diff --git a/mindspore/lite/src/cxx_api/converters.cc b/mindspore/lite/src/cxx_api/converters.cc index 33d8626a39..e583c87643 100644 --- a/mindspore/lite/src/cxx_api/converters.cc +++ b/mindspore/lite/src/cxx_api/converters.cc @@ -14,114 +14,149 @@ * limitations under the License. */ #include "src/cxx_api/converters.h" -#include -#include -#include -#include -#include "include/context.h" -#include "include/api/context.h" -#include "src/runtime/inner_allocator.h" #include "src/common/log_adapter.h" -#include "nnacl/op_base.h" namespace mindspore { constexpr static int kMaxNumOfDevices = 3; -Status AddCpuDevice(Context *a_context, lite::InnerContext *l_context, DeviceInfoContext *device) { - auto cpu_context = device->Cast(); - l_context->allocator = cpu_context->GetAllocator(); - if (l_context->allocator == nullptr) { - l_context->allocator = Allocator::Create(); - if (l_context->allocator == nullptr) { - MS_LOG(ERROR) << "Create Allocator failed."; - return kLiteNullptr; - } - MS_LOG(DEBUG) << "Set new allocator."; - cpu_context->SetAllocator(l_context->allocator); - } +void ContextUtils::SetContextAttr(int32_t thread_num, bool enable_parallel, + const std::vector &affinity_core_list, + const std::shared_ptr &delegate, lite::InnerContext *inner_context) { + inner_context->thread_num_ = thread_num; + inner_context->enable_parallel_ = enable_parallel; + inner_context->affinity_core_list_ = affinity_core_list; + inner_context->delegate = delegate; +} - if (!IsAffinityModeValid(a_context->GetThreadAffinityMode())) { - MS_LOG(ERROR) - << "Invalid affinity mode, only supports 0: no affinities, 1: big cores first, 2: little cores first."; +Status ContextUtils::AddCpuDevice(const std::shared_ptr &allocator, int affinity_mode, bool enable_fp16, + const std::string &provider, const std::string &provider_device, + lite::InnerContext *inner_context) { + inner_context->allocator = allocator; + if (!IsAffinityModeValid(affinity_mode)) { + MS_LOG(ERROR) << "Invalid affinity mode, only supports 0:no affinities, 1:big cores first, 2:little cores first."; return kLiteInputParamInvalid; } - lite::CpuBindMode mode = A2L_ConvertAffinityMode(a_context->GetThreadAffinityMode()); - - lite::DeviceInfo cpu_info = {0}; - cpu_info.cpu_device_info_ = {cpu_context->GetEnableFP16(), mode}; - l_context->device_list_.push_back({lite::DT_CPU, cpu_info, cpu_context->GetProvider(), - cpu_context->GetProviderDevice(), cpu_context->GetAllocator()}); + lite::DeviceInfo device_info; + device_info.cpu_device_info_ = {enable_fp16, static_cast(affinity_mode)}; + inner_context->device_list_.push_back({lite::DT_CPU, device_info, provider, provider_device, allocator}); return kSuccess; } -Status AddGpuDevice(Context *a_context, lite::InnerContext *l_context, DeviceInfoContext *device) { - lite::DeviceInfo device_info = {0}; - auto gpu_context = device->Cast(); - device_info.gpu_device_info_ = {gpu_context->GetEnableFP16(), gpu_context->GetDeviceID()}; - l_context->device_list_.push_back({lite::DT_GPU, device_info, gpu_context->GetProvider(), - gpu_context->GetProviderDevice(), gpu_context->GetAllocator()}); +Status ContextUtils::AddGpuDevice(bool enable_fp16, uint32_t device_id, int rank_id, int group_size, + bool enable_gl_texture, void *gl_context, void *gl_display, + const std::string &provider, const std::string &provider_device, + const std::shared_ptr &allocator, lite::InnerContext *inner_context) { + lite::DeviceInfo device_info; + device_info.gpu_device_info_ = {enable_fp16, device_id, rank_id, group_size, + enable_gl_texture, gl_context, gl_display}; + inner_context->device_list_.push_back({lite::DT_GPU, device_info, provider, provider_device, allocator}); return kSuccess; } -Status AddNpuDevice(Context *a_context, lite::InnerContext *l_context, DeviceInfoContext *device) { - lite::DeviceInfo device_info = {0}; - auto npu_context = device->Cast(); - device_info.npu_device_info_ = {npu_context->GetFrequency()}; - l_context->device_list_.push_back({lite::DT_NPU, device_info}); +Status ContextUtils::AddNpuDevice(int frequency, lite::InnerContext *inner_context) { + lite::DeviceInfo device_info; + device_info.npu_device_info_ = {frequency}; + inner_context->device_list_.push_back({lite::DT_NPU, device_info}); return kSuccess; } -Status AddAscend310Device(Context *a_context, lite::InnerContext *l_context, DeviceInfoContext *device) { - lite::DeviceInfo device_info = {0}; - auto ascend310_context = device->Cast(); - device_info.ascend310_device_info_ = {ascend310_context->GetDeviceID()}; - l_context->device_list_.push_back({lite::DT_ASCEND310, device_info}); +Status ContextUtils::AddAscendDevice(lite::InnerContext *inner_context, DeviceInfoContext *device) { + lite::DeviceInfo device_info; + auto ascend_context = device->Cast(); + device_info.ascend_device_info_ = {ascend_context->GetDeviceID(), ascend_context->GetDynamicBatchSize(), + ascend_context->GetDynamicImageSize()}; + inner_context->device_list_.push_back({lite::DT_ASCEND, device_info}); return kSuccess; } -Status A2L_ConvertContext(Context *a_context, lite::InnerContext *l_context) { - if ((a_context == nullptr) || (l_context == nullptr)) { +lite::InnerContext *ContextUtils::Convert(Context *context) { + auto inner_context = std::make_unique(); + if ((context == nullptr) || (inner_context == nullptr)) { MS_LOG(ERROR) << "Invalid context pointers."; - return kLiteNullptr; - } - - auto device_list = a_context->MutableDeviceInfo(); - if (device_list.size() == 0) { - MS_LOG(ERROR) << "Invalid device list."; - return kLiteInputParamInvalid; + return nullptr; } - if (device_list.size() > kMaxNumOfDevices) { - MS_LOG(ERROR) << "Device support Max: " << kMaxNumOfDevices; - return kLiteInputParamInvalid; + auto device_list = context->MutableDeviceInfo(); + if (device_list.size() == 0 || device_list.size() > kMaxNumOfDevices) { + MS_LOG(ERROR) << "Device num, support min: 1, max: " << kMaxNumOfDevices; + return nullptr; } - l_context->thread_num_ = a_context->GetThreadNum(); - l_context->enable_parallel_ = a_context->GetEnableParallel(); - l_context->affinity_core_list_ = a_context->GetThreadAffinityCoreList(); - l_context->device_list_.clear(); - - Status error_code; + SetContextAttr(context->GetThreadNum(), context->GetEnableParallel(), context->GetThreadAffinityCoreList(), + context->GetDelegate(), inner_context.get()); + inner_context->device_list_.clear(); + Status ret = kLiteError; for (auto &device : device_list) { - MS_CHECK_TRUE_RET(device != nullptr, kLiteNullptr); + MS_CHECK_TRUE_RET(device != nullptr, nullptr); if (device->GetDeviceType() == kCPU) { - error_code = AddCpuDevice(a_context, l_context, device.get()); + auto cpu_context = device->Cast(); + if (cpu_context->GetAllocator() == nullptr) { + cpu_context->SetAllocator(Allocator::Create()); + } + ret = AddCpuDevice(cpu_context->GetAllocator(), context->GetThreadAffinityMode(), cpu_context->GetEnableFP16(), + cpu_context->GetProvider(), cpu_context->GetProviderDevice(), inner_context.get()); } else if (device->GetDeviceType() == kGPU) { - error_code = AddGpuDevice(a_context, l_context, device.get()); + auto gpu_context = device->Cast(); +#ifdef ENABLE_OPENGL_TEXTURE + bool enable_gl_texture = gpu_context->GetEnableGLTexture(); + void *gl_context = gpu_context->GetGLContext(); + void *gl_display = gpu_context->GetGLDisplay(); +#else + bool enable_gl_texture = false; + void *gl_context = nullptr; + void *gl_display = nullptr; +#endif + ret = + AddGpuDevice(gpu_context->GetEnableFP16(), gpu_context->GetDeviceID(), gpu_context->GetRankID(), + gpu_context->GetGroupSize(), enable_gl_texture, gl_context, gl_display, gpu_context->GetProvider(), + gpu_context->GetProviderDevice(), gpu_context->GetAllocator(), inner_context.get()); } else if (device->GetDeviceType() == kKirinNPU) { - error_code = AddNpuDevice(a_context, l_context, device.get()); - } else if (device->GetDeviceType() == kAscend310) { - error_code = AddAscend310Device(a_context, l_context, device.get()); - } else { - MS_LOG(ERROR) << "Invalid device."; - return kLiteInputParamInvalid; + auto npu_context = device->Cast(); + ret = AddNpuDevice(npu_context->GetFrequency(), inner_context.get()); + } else if (device->GetDeviceType() == kAscend) { + ret = AddAscendDevice(inner_context.get(), device.get()); } - - if (error_code != kSuccess) { + if (ret != kSuccess) { MS_LOG(ERROR) << "Add device failed!"; - return error_code; + return nullptr; } } + return inner_context.release(); +} - l_context->delegate = a_context->GetDelegate(); - return kSuccess; +lite::InnerContext *ContextUtils::Convert(const ContextC *context_c) { + auto inner_context = std::make_unique(); + if ((context_c == nullptr) || (inner_context == nullptr)) { + MS_LOG(ERROR) << "Invalid context pointers."; + return nullptr; + } + auto device_list = context_c->device_info_list; + if (device_list.size() == 0 || device_list.size() > kMaxNumOfDevices) { + MS_LOG(ERROR) << "Device num, support min: 1, max: " << kMaxNumOfDevices; + return nullptr; + } + SetContextAttr(context_c->thread_num, context_c->enable_parallel, context_c->affinity_core_list, context_c->delegate, + inner_context.get()); + inner_context->device_list_.clear(); + Status ret = kLiteError; + for (auto &device_info_c : device_list) { + MS_CHECK_TRUE_RET(device_info_c != nullptr, nullptr); + lite::DeviceInfo device_info = {{0}}; + if (device_info_c->device_type == OH_AI_DEVICETYPE_CPU) { + if (device_info_c->allocator == nullptr) { + device_info_c->allocator = Allocator::Create(); + } + ret = AddCpuDevice(device_info_c->allocator, context_c->affinity_mode, device_info_c->enable_fp16, + device_info_c->provider, device_info_c->provider_device, inner_context.get()); + } else if (device_info_c->device_type == OH_AI_DEVICETYPE_GPU) { + ret = AddGpuDevice(device_info_c->enable_fp16, 0, 0, 0, false, nullptr, nullptr, device_info_c->provider, + device_info_c->provider_device, device_info_c->allocator, inner_context.get()); + } else if (device_info_c->device_type == OH_AI_DEVICETYPE_KIRIN_NPU) { + ret = AddNpuDevice(device_info_c->frequency, inner_context.get()); + } + if (ret != kSuccess) { + MS_LOG(ERROR) << "Add device failed!"; + return nullptr; + } + } + return inner_context.release(); } } // namespace mindspore diff --git a/mindspore/lite/src/inner_kernel.h b/mindspore/lite/src/inner_kernel.h index 4584e9c7fe..75c1a5addb 100644 --- a/mindspore/lite/src/inner_kernel.h +++ b/mindspore/lite/src/inner_kernel.h @@ -93,18 +93,6 @@ class InnerKernel : public Kernel { : schema::PrimitiveType_NONE; } - void set_inputs(const std::vector &in_tensors) { - this->in_tensors_.resize(in_tensors.size()); - (void)std::transform(in_tensors.begin(), in_tensors.end(), in_tensors_.begin(), - [](mindspore::tensor::MSTensor *tensor) { return static_cast(tensor); }); - } - - void set_outputs(const std::vector &out_tensors) { - this->out_tensors_.resize(out_tensors.size()); - (void)std::transform(out_tensors.begin(), out_tensors.end(), out_tensors_.begin(), - [](mindspore::tensor::MSTensor *tensor) { return static_cast(tensor); }); - } - const std::vector &inputs() override { if (inputs_.empty()) { std::transform(in_tensors_.begin(), in_tensors_.end(), std::back_inserter(inputs_), [](lite::Tensor *tensor) { diff --git a/mindspore/lite/src/ops/populate/adam_populate.cc b/mindspore/lite/src/ops/populate/adam_populate.cc index da246ec993..c5f565731e 100644 --- a/mindspore/lite/src/ops/populate/adam_populate.cc +++ b/mindspore/lite/src/ops/populate/adam_populate.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "src/ops/populate/populate_register.h" -#include "backend/kernel_compiler/cpu/nnacl/op_base.h" +#include "nnacl/op_base.h" using mindspore::schema::PrimitiveType_Adam; namespace mindspore { diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.cc index 7d6b006fb9..dc90aee02d 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.cc @@ -248,7 +248,7 @@ void ArithmeticCPUKernel::InitRunFunction(int primitive_type) { } } -int ArithmeticCPUKernel::Execute(const void *input0, const void *input1, void *output, int size, bool is_opt) { +int ArithmeticCPUKernel::DoExecute(const void *input0, const void *input1, void *output, int size, bool is_opt) { int ret = RET_OK; if (in_tensors_[0]->data_type() == kNumberTypeFloat32) { if (is_opt) { @@ -282,7 +282,7 @@ int ArithmeticCPUKernel::BroadcastRun(void *input0, void *input1, void *output, int out_thread_stride) { if (dim > break_pos_) { int offset = out_thread_stride * data_type_len_; - return Execute(static_cast(input0) + offset, static_cast(input1) + offset, + return DoExecute(static_cast(input0) + offset, static_cast(input1) + offset, static_cast(output) + offset, out_count, false); } int offset_size[] = {param_->in_strides0_[dim] * data_type_len_, param_->in_strides1_[dim] * data_type_len_, @@ -325,7 +325,7 @@ int ArithmeticCPUKernel::BatchScalarCalc(int task_id) { int ret = RET_OK; for (int i = 0; i < batch_size; i++) { - ret = Execute(static_cast(input0_ptr_) + offset0, static_cast(input1_ptr_) + offset1, + ret = DoExecute(static_cast(input0_ptr_) + offset0, static_cast(input1_ptr_) + offset1, static_cast(output_ptr_) + out_offset, param_->out_strides_[break_pos_ - 1], true); offset0 += stride0; offset1 += stride1; @@ -352,7 +352,7 @@ int ArithmeticCPUKernel::BiasCalc(int task_id) { int ret = RET_OK; if (param_->in_elements_num0_ > param_->in_elements_num1_) { for (int i = 0; i < batch_size; i++) { - ret = Execute(static_cast(input0_ptr_) + offset, static_cast(input1_ptr_), + ret = DoExecute(static_cast(input0_ptr_) + offset, static_cast(input1_ptr_), static_cast(output_ptr_) + offset, last_shape, false); if (ret != RET_OK) { return ret; @@ -361,7 +361,7 @@ int ArithmeticCPUKernel::BiasCalc(int task_id) { } } else { for (int i = 0; i < batch_size; i++) { - ret = Execute(static_cast(input0_ptr_), static_cast(input1_ptr_) + offset, + ret = DoExecute(static_cast(input0_ptr_), static_cast(input1_ptr_) + offset, static_cast(output_ptr_) + offset, last_shape, false); if (ret != RET_OK) { return ret; @@ -384,10 +384,10 @@ int ArithmeticCPUKernel::DoArithmetic(int task_id) { /* run opt function, one of input is scalar */ if (IsScalarClac()) { // 2 32 240 240, 1 1 1 1 if (param_->in_elements_num0_ == 1) { - return Execute(input0_ptr_, static_cast(input1_ptr_) + offset, + return DoExecute(input0_ptr_, static_cast(input1_ptr_) + offset, static_cast(output_ptr_) + offset, count, true); } else if (param_->in_elements_num1_ == 1) { - return Execute(static_cast(input0_ptr_) + offset, input1_ptr_, + return DoExecute(static_cast(input0_ptr_) + offset, input1_ptr_, static_cast(output_ptr_) + offset, count, true); } } @@ -409,7 +409,7 @@ int ArithmeticCPUKernel::DoArithmetic(int task_id) { return BroadcastRun(input0_ptr_, input1_ptr_, output_ptr_, 0, out_count, stride * task_id); } /* all elements eltwise calculation */ - return Execute(static_cast(input0_ptr_) + offset, static_cast(input1_ptr_) + offset, + return DoExecute(static_cast(input0_ptr_) + offset, static_cast(input1_ptr_) + offset, static_cast(output_ptr_) + offset, count, false); } diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.h b/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.h index 8ffc130dd7..ee0b29ad1f 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.h +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.h @@ -80,7 +80,7 @@ class ArithmeticCPUKernel : public InnerKernel { virtual int ConstTensorBroadCast(); virtual void TileConstTensor(const void *in_data, void *out_data, size_t ndim, const int *in_shape, const int *in_strides, const int *out_strides, const int *multiple); - virtual int Execute(const void *input0, const void *input1, void *output, int size, bool is_opt); + virtual int DoExecute(const void *input0, const void *input1, void *output, int size, bool is_opt); virtual bool IsBatchScalarCalc(); virtual bool IsScalarClac(); bool input0_broadcast_ = false; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.cc index 77c85f92d7..381e24e61c 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.cc @@ -56,7 +56,7 @@ int ConvolutionDepthwise3x3CPUKernel::ReSize() { return RET_OK; } -int ConvolutionDepthwise3x3CPUKernel::Execute(int task_id) { +int ConvolutionDepthwise3x3CPUKernel::DoExecute(int task_id) { int units = UP_DIV(conv_param_->output_w_, C2NUM); // F(2, 3) contains 2 conv units int c4 = UP_ROUND(conv_param_->input_channel_, C4NUM); auto buffer = buffer_ + C12NUM * c4 * units * task_id; @@ -74,7 +74,7 @@ int ConvolutionDepthwise3x3CPUKernel::Execute(int task_id) { int ConvDw3x3Run(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto conv_dw = reinterpret_cast(cdata); - auto ret = conv_dw->Execute(task_id); + auto ret = conv_dw->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "ConvolutionDepthwise3x3Run error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.h b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.h index f11accb60a..e49c013c2a 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.h +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_3x3_fp32.h @@ -36,7 +36,7 @@ class ConvolutionDepthwise3x3CPUKernel : public ConvolutionBaseCPUKernel { int ReSize() override; int Run() override; - int Execute(int task_id); + int DoExecute(int task_id); private: int MallocWeightBiasData() override; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.cc index 2df94860aa..3baab0b771 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.cc @@ -60,7 +60,7 @@ int ConvolutionDepthwiseCPUKernel::ReSize() { return RET_OK; } -int ConvolutionDepthwiseCPUKernel::Execute(int task_id) { +int ConvolutionDepthwiseCPUKernel::DoExecute(int task_id) { auto ret = ConvDw(output_ptr_, input_ptr_, reinterpret_cast(packed_weight_), reinterpret_cast(bias_data_), conv_param_, task_id); return ret; @@ -68,7 +68,7 @@ int ConvolutionDepthwiseCPUKernel::Execute(int task_id) { int ConvDwRun(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto conv_dw = reinterpret_cast(cdata); - auto ret = conv_dw->Execute(task_id); + auto ret = conv_dw->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "ConvolutionDepthwiseRun error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.h b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.h index aad1d8c2bc..fb754a02f3 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.h +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_fp32.h @@ -36,7 +36,7 @@ class ConvolutionDepthwiseCPUKernel : public ConvolutionBaseCPUKernel { int ReSize() override; int Run() override; - int Execute(int task_id); + int DoExecute(int task_id); private: int MallocWeightBiasData() override; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.cc index acf6e16a41..45c6fd78a6 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.cc @@ -96,7 +96,7 @@ int ConvolutionDepthwiseIndirectCPUKernel::ReSize() { return RET_OK; } -int ConvolutionDepthwiseIndirectCPUKernel::Execute(int task_id) { +int ConvolutionDepthwiseIndirectCPUKernel::DoExecute(int task_id) { ConvDwIndirection(output_ptr_, indirect_buffer_, reinterpret_cast(packed_weight_), reinterpret_cast(bias_data_), zero_ptr_, conv_param_, task_id); return RET_OK; @@ -104,7 +104,7 @@ int ConvolutionDepthwiseIndirectCPUKernel::Execute(int task_id) { int ConvDwIndirectRun(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto conv_dw = reinterpret_cast(cdata); - auto ret = conv_dw->Execute(task_id); + auto ret = conv_dw->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "ConvolutionDepthwiseIndirectRun error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.h b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.h index ef51bef536..6b0964ac40 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.h +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_indirect_fp32.h @@ -35,7 +35,7 @@ class ConvolutionDepthwiseIndirectCPUKernel : public ConvolutionBaseCPUKernel { int ReSize() override; int Run() override; - int Execute(int task_id); + int DoExecute(int task_id); private: int MallocIndirectBuffer(); diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.cc index ac8578a7e0..16eea14a16 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.cc @@ -91,7 +91,7 @@ int ConvolutionDepthwiseSWCPUKernel::ReSize() { return RET_OK; } -int ConvolutionDepthwiseSWCPUKernel::Execute(int task_id) { +int ConvolutionDepthwiseSWCPUKernel::DoExecute(int task_id) { ConvDwSWFp32(packed_output_, packed_input_, reinterpret_cast(packed_weight_), reinterpret_cast(bias_data_), conv_param_, sliding_, task_id); return RET_OK; @@ -99,7 +99,7 @@ int ConvolutionDepthwiseSWCPUKernel::Execute(int task_id) { int ConvDwSWRun(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto conv_dw = reinterpret_cast(cdata); - auto ret = conv_dw->Execute(task_id); + auto ret = conv_dw->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "ConvolutionDepthwiseSWRun error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.h b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.h index b1d48c029c..ed3359f4a3 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.h +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise_slidewindow_fp32.h @@ -35,7 +35,7 @@ class ConvolutionDepthwiseSWCPUKernel : public ConvolutionBaseCPUKernel { int ReSize() override; int Run() override; - int Execute(int task_id); + int DoExecute(int task_id); private: int InitPackedInputOutput(); diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.cc index d314eb1673..350f3e0a66 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.cc @@ -115,7 +115,7 @@ int DeconvolutionDepthwiseCPUKernel::ReSize() { return RET_OK; } -int DeconvolutionDepthwiseCPUKernel::Execute(int task_id) { +int DeconvolutionDepthwiseCPUKernel::DoExecute(int task_id) { DeconvDwSWFp32(packed_output_, packed_input_, reinterpret_cast(packed_weight_), reinterpret_cast(bias_data_), conv_param_, sliding_, task_id); return RET_OK; @@ -123,7 +123,7 @@ int DeconvolutionDepthwiseCPUKernel::Execute(int task_id) { int DeconvDwRun(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto deconv_dw = reinterpret_cast(cdata); - auto ret = deconv_dw->Execute(task_id); + auto ret = deconv_dw->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "DeconvolutionDepthwiseRun error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.h b/mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.h index 5df9201ea2..bf9aec5747 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.h +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution_depthwise_fp32.h @@ -35,7 +35,7 @@ class DeconvolutionDepthwiseCPUKernel : public ConvolutionBaseCPUKernel { int InitSlideParam(); int ReSize() override; int Run() override; - int Execute(int task_id); + int DoExecute(int task_id); private: int InitPackedInputOutput(); diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/non_max_suppression_fp32.h b/mindspore/lite/src/runtime/kernel/arm/fp32/non_max_suppression_fp32.h index 5496426e00..c19205c64b 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/non_max_suppression_fp32.h +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/non_max_suppression_fp32.h @@ -34,16 +34,16 @@ class NonMaxSuppressionCPUKernel : public InnerKernel { ~NonMaxSuppressionCPUKernel() override = default; - int Init() override; + int Prepare() override; int ReSize() override { return RET_OK; }; int PreProcess() override; int Run() override; private: int GetParams(); - int Run_Selecte(bool simple_out, int box_num, int batch_num, int class_num, float *scores_data, float *box_data); + int Run_Selecte(bool simple_out, int box_num, int batch_num, int class_num, const float *scores_data, + const float *box_data); - private: int center_point_box_ = 0; float iou_threshold_ = 0; float score_threshold_ = 0; @@ -83,14 +83,13 @@ class NMSBox { return score_ < box.score_ || (std::abs(score_ - box.score_) < FLT_EPSILON && index_ > box.index_); } - public: - const float get_score() const { return score_; } - const int get_index() const { return index_; } - const float get_y1() const { return y1_; } - const float get_y2() const { return y2_; } - const float get_x1() const { return x1_; } - const float get_x2() const { return x2_; } - const float get_area() const { return area_; } + float get_score() const { return score_; } + int get_index() const { return index_; } + float get_y1() const { return y1_; } + float get_y2() const { return y2_; } + float get_x1() const { return x1_; } + float get_x2() const { return x2_; } + float get_area() const { return area_; } private: float score_; diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.cc b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.cc index 1ce9679994..e1cbe24224 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.cc +++ b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.cc @@ -141,7 +141,7 @@ int ConvolutionDepthwise3x3Int8CPUKernel::ReSize() { return RET_OK; } -int ConvolutionDepthwise3x3Int8CPUKernel::Execute(int task_id) { +int ConvolutionDepthwise3x3Int8CPUKernel::DoExecute(int task_id) { auto buffer = buffer_ + kConvDepthwise3x3BufferSize * task_id; ConvDw3x3Int8(output_ptr_, buffer, input_ptr_, packed_weight_, reinterpret_cast(bias_data_), conv_param_, sliding_, task_id); @@ -150,7 +150,7 @@ int ConvolutionDepthwise3x3Int8CPUKernel::Execute(int task_id) { int ConvDw3x3Int8Run(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto conv_dw_int8 = reinterpret_cast(cdata); - auto ret = conv_dw_int8->Execute(task_id); + auto ret = conv_dw_int8->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "ConvolutionDepthwise3x3Int8Run error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.h b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.h index 93a50ccc0b..5f3841badc 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.h +++ b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_3x3_int8.h @@ -35,7 +35,7 @@ class ConvolutionDepthwise3x3Int8CPUKernel : public ConvolutionBaseCPUKernel { int Run() override; int InitWeightBias(); - int Execute(int task_id); + int DoExecute(int task_id); private: int InitBuffer(); diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.cc b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.cc index a887325764..c3e366f89f 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.cc +++ b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.cc @@ -117,7 +117,7 @@ int ConvolutionDepthwiseInt8CPUKernel::Init() { int ConvolutionDepthwiseInt8CPUKernel::ReSize() { return ConvolutionBaseCPUKernel::Init(); } -int ConvolutionDepthwiseInt8CPUKernel::Execute(int task_id) { +int ConvolutionDepthwiseInt8CPUKernel::DoExecute(int task_id) { auto buffer = row_buffer_ + conv_param_->output_w_ * conv_param_->output_channel_ * task_id; ConvDwInt8(output_ptr_, buffer, input_ptr_, packed_weight_, reinterpret_cast(bias_data_), conv_param_, task_id); @@ -126,7 +126,7 @@ int ConvolutionDepthwiseInt8CPUKernel::Execute(int task_id) { int ConvDwInt8Run(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto conv_dw_int8 = reinterpret_cast(cdata); - auto ret = conv_dw_int8->Execute(task_id); + auto ret = conv_dw_int8->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "ConvolutionDepthwiseInt8Run error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.h b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.h index ccb22bf210..bcb4ed274f 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.h +++ b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.h @@ -35,7 +35,7 @@ class ConvolutionDepthwiseInt8CPUKernel : public ConvolutionBaseCPUKernel { int Run() override; int InitWeightBias(); - int Execute(int task_id); + int DoExecute(int task_id); private: int InitBuffer(); diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.cc b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.cc index d7de1db2a8..db07b5505c 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.cc +++ b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.cc @@ -289,7 +289,7 @@ int ConvolutionDepthwiseSWInt8CPUKernel::ReSize() { return RET_OK; } -int ConvolutionDepthwiseSWInt8CPUKernel::Execute(int task_id) { +int ConvolutionDepthwiseSWInt8CPUKernel::DoExecute(int task_id) { ConvDwInt8SW(packed_output_, packed_input_, packed_weight_, reinterpret_cast(bias_data_), input_zp_, output_zp_, conv_param_, sliding_, task_id); return RET_OK; @@ -297,7 +297,7 @@ int ConvolutionDepthwiseSWInt8CPUKernel::Execute(int task_id) { int ConvDwSWInt8Run(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto conv_dw_int8 = reinterpret_cast(cdata); - auto ret = conv_dw_int8->Execute(task_id); + auto ret = conv_dw_int8->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "ConvolutionDepthwiseSWInt8Run error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.h b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.h index b11576f43d..43e4edb0ce 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.h +++ b/mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_slidewindow_int8.h @@ -37,7 +37,7 @@ class ConvolutionDepthwiseSWInt8CPUKernel : public ConvolutionBaseCPUKernel { int InitWeightBias(); int InitPackedInputOutput(); - int Execute(int task_id); + int DoExecute(int task_id); private: void FreePackedInputOutput(); diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.cc b/mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.cc index 7f47756be0..17e53f632a 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.cc +++ b/mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.cc @@ -165,7 +165,7 @@ int DeconvolutionDepthwiseInt8CPUKernel::ReSize() { return RET_OK; } -int DeconvolutionDepthwiseInt8CPUKernel::Execute(int task_id) { +int DeconvolutionDepthwiseInt8CPUKernel::DoExecute(int task_id) { auto buffer = output_buffer_ + conv_param_->output_h_ * conv_param_->output_w_ * C4NUM * task_id; DeconvDwInt8(packed_output_, buffer, packed_input_, packed_weight_, reinterpret_cast(bias_data_), conv_param_, sliding_, task_id); @@ -174,7 +174,7 @@ int DeconvolutionDepthwiseInt8CPUKernel::Execute(int task_id) { int DeconvDwInt8Run(void *cdata, int task_id, float lhs_scale, float rhs_scale) { auto deconv_dw_int8 = reinterpret_cast(cdata); - auto ret = deconv_dw_int8->Execute(task_id); + auto ret = deconv_dw_int8->DoExecute(task_id); if (ret != RET_OK) { MS_LOG(ERROR) << "DeconvolutionDepthwiseInt8Run error task_id[" << task_id << "] error_code[" << ret << "]"; return RET_ERROR; diff --git a/mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.h b/mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.h index 807cbbe628..04e4f9fc94 100644 --- a/mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.h +++ b/mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_depthwise_int8.h @@ -37,7 +37,7 @@ class DeconvolutionDepthwiseInt8CPUKernel : public ConvolutionBaseCPUKernel { int InitSlideParam(); int InitWeightBias(); int InitBuffer(); - int Execute(int task_id); + int DoExecute(int task_id); private: SlidingWindowParam *sliding_ = nullptr; -- Gitee