diff --git a/mindspore/lite/src/ops/populate/arithmetic_populate.h b/mindspore/lite/src/ops/populate/arithmetic_populate.h index b650a94bb5..1112919aba 100644 --- a/mindspore/lite/src/ops/populate/arithmetic_populate.h +++ b/mindspore/lite/src/ops/populate/arithmetic_populate.h @@ -20,7 +20,10 @@ namespace mindspore { namespace lite { + ArithmeticParameter *PopulateArithmeticCommonPara(const mindspore::lite::PrimitiveC *primitive); +OpParameter *PopulateArithmetic(const mindspore::lite::PrimitiveC *primitive); + } // namespace lite } // namespace mindspore #endif // MINDSPORE_LITE_SRC_OPS_POPULATE_ARITHMETIC_POPULATE_H_ diff --git a/mindspore/lite/src/ops/populate/populate_register.h b/mindspore/lite/src/ops/populate/populate_register.h index d1c8907c3f..704be5c4e3 100644 --- a/mindspore/lite/src/ops/populate/populate_register.h +++ b/mindspore/lite/src/ops/populate/populate_register.h @@ -21,6 +21,7 @@ namespace mindspore { namespace lite { + class PopulateRegistry { public: static PopulateRegistry *GetInstance() { @@ -50,8 +51,7 @@ class Registry { } ~Registry() = default; }; -OpParameter *PopulateArithmetic(const mindspore::lite::PrimitiveC *primitive); -OpParameter *PopulateStridedSliceParameter(const mindspore::lite::PrimitiveC *primitive); + } // namespace lite } // namespace mindspore #endif diff --git a/mindspore/lite/src/ops/populate/strided_slice_populate.cc b/mindspore/lite/src/ops/populate/strided_slice_populate.cc index 1ff1218930..4028f35585 100644 --- a/mindspore/lite/src/ops/populate/strided_slice_populate.cc +++ b/mindspore/lite/src/ops/populate/strided_slice_populate.cc @@ -14,6 +14,7 @@ * limitations under the License. */ +#include "src/ops/populate/strided_slice_populate.h" #include "src/ops/strided_slice.h" #include "src/ops/primitive_c.h" #include "src/ops/populate/populate_register.h" @@ -46,5 +47,6 @@ OpParameter *PopulateStridedSliceParameter(const mindspore::lite::PrimitiveC *pr } Registry StridedSliceParameterRegistry(schema::PrimitiveType_StridedSlice, PopulateStridedSliceParameter); + } // namespace lite } // namespace mindspore diff --git a/mindspore/lite/src/ops/populate/strided_slice_populate.h b/mindspore/lite/src/ops/populate/strided_slice_populate.h new file mode 100644 index 0000000000..6876657c6f --- /dev/null +++ b/mindspore/lite/src/ops/populate/strided_slice_populate.h @@ -0,0 +1,25 @@ +/** + * Copyright 2019-2020 Huawei Technologies Co., Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "src/ops/arithmetic.h" + +namespace mindspore { +namespace lite { + +OpParameter *PopulateStridedSliceParameter(const mindspore::lite::PrimitiveC *primitive); + +} // namespace lite +} // namespace mindspore diff --git a/mindspore/lite/src/ops/strided_slice.cc b/mindspore/lite/src/ops/strided_slice.cc index e4d159b0e9..ea8c0b3d74 100644 --- a/mindspore/lite/src/ops/strided_slice.cc +++ b/mindspore/lite/src/ops/strided_slice.cc @@ -15,6 +15,7 @@ */ #include "src/ops/strided_slice.h" +#include "src/ops/populate/strided_slice_populate.h" #include #ifndef PRIMITIVE_WRITEABLE diff --git a/mindspore/lite/src/runtime/kernel/arm/base/strided_slice.cc b/mindspore/lite/src/runtime/kernel/arm/base/strided_slice.cc index a01f53e381..6fc8d8b9c8 100644 --- a/mindspore/lite/src/runtime/kernel/arm/base/strided_slice.cc +++ b/mindspore/lite/src/runtime/kernel/arm/base/strided_slice.cc @@ -20,7 +20,7 @@ #include "src/kernel_registry.h" #include "include/errorcode.h" #include "src/runtime/runtime_api.h" -#include "src/ops/populate/populate_register.h" +#include "src/ops/populate/strided_slice_populate.h" using mindspore::kernel::KERNEL_ARCH::kCPU; using mindspore::lite::KernelRegistrar; diff --git a/mindspore/lite/src/runtime/kernel/arm/fp16/arithmetic_fp16.cc b/mindspore/lite/src/runtime/kernel/arm/fp16/arithmetic_fp16.cc index f331a16ecc..fe979f0377 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp16/arithmetic_fp16.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp16/arithmetic_fp16.cc @@ -21,7 +21,7 @@ #include "schema/model_generated.h" #include "src/kernel_registry.h" #include "src/runtime/runtime_api.h" -#include "src/ops/populate/populate_register.h" +#include "src/ops/populate/arithmetic_populate.h" #include "include/errorcode.h" using mindspore::kernel::KERNEL_ARCH::kCPU; 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 ab2c00ad09..c9a0d7eac9 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.cc @@ -20,7 +20,7 @@ #include "src/kernel_registry.h" #include "src/runtime/kernel/arm/int8/add_int8.h" #include "src/runtime/runtime_api.h" -#include "src/ops/populate/populate_register.h" +#include "src/ops/populate/arithmetic_populate.h" using mindspore::kernel::KERNEL_ARCH::kCPU; using mindspore::lite::KernelRegistrar;