Browse Source

rename and change lib c++_static to c++_shared

tags/v1.1.0
yeyunpeng 5 years ago
parent
commit
7945bbf9f2
36 changed files with 259 additions and 101 deletions
  1. +5
    -2
      build.sh
  2. +1
    -1
      mindspore/lite/nnacl/int8/common_func_int8.c
  3. +0
    -0
      mindspore/lite/nnacl/int8/common_func_int8.h
  4. +1
    -1
      mindspore/lite/nnacl/int8/conv_depthwise_int8.c
  5. +1
    -1
      mindspore/lite/nnacl/int8/conv_int8.c
  6. +2
    -2
      mindspore/lite/nnacl/int8/deconv_int8.c
  7. +0
    -0
      mindspore/lite/nnacl/int8/deconv_int8.h
  8. +1
    -1
      mindspore/lite/nnacl/int8/pad_int8.c
  9. +0
    -0
      mindspore/lite/nnacl/int8/pad_int8.h
  10. +1
    -1
      mindspore/lite/nnacl/int8/quant_dtype_cast_int8.c
  11. +0
    -0
      mindspore/lite/nnacl/int8/quant_dtype_cast_int8.h
  12. +1
    -1
      mindspore/lite/nnacl/int8/resize_int8.c
  13. +0
    -0
      mindspore/lite/nnacl/int8/resize_int8.h
  14. +37
    -0
      mindspore/lite/src/ops/populate/add_populate.cc
  15. +3
    -75
      mindspore/lite/src/ops/populate/arithmetic_populate.cc
  16. +23
    -0
      mindspore/lite/src/ops/populate/arithmetic_populate.h
  17. +37
    -0
      mindspore/lite/src/ops/populate/div_populate.cc
  18. +52
    -0
      mindspore/lite/src/ops/populate/eltwise_populate.cc
  19. +39
    -0
      mindspore/lite/src/ops/populate/mul_populate.cc
  20. +1
    -1
      mindspore/lite/src/ops/populate/quant_dtype_cast_populate.cc
  21. +39
    -0
      mindspore/lite/src/ops/populate/sub_populate.cc
  22. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/base/detection_post_process_base.cc
  23. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/base/quant_dtype_cast.cc
  24. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/fp16/quant_dtype_cast_fp16.cc
  25. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/fp32/detection_post_process.cc
  26. +0
    -0
      mindspore/lite/src/runtime/kernel/arm/int8/activation_int8.cc
  27. +2
    -2
      mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_int8.h
  28. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/int8/detection_post_process_int8.cc
  29. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/int8/fullconnection_int8.h
  30. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/int8/pad_int8.cc
  31. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/int8/pad_int8.h
  32. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/int8/resize_int8.cc
  33. +1
    -1
      mindspore/lite/test/ut/src/runtime/kernel/arm/int8/deconv_int8_tests.cc
  34. +1
    -1
      mindspore/lite/test/ut/src/runtime/kernel/arm/int8/quant_dtype_cast_tests.cc
  35. +1
    -1
      mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_bilinear_int8_tests.cc
  36. +1
    -1
      mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_nearest_neighbor_int8_tests.cc

+ 5
- 2
build.sh View File

@@ -115,6 +115,7 @@ checkopts()
ENABLE_CONVERTER="on"
LITE_LANGUAGE="cpp"
ENABLE_GITEE="off"
ANDROID_STL="c++_shared"

# Process the options
while getopts 'drvj:c:t:hsb:a:g:p:ie:m:l:I:LRP:D:zM:V:K:swB:En:T:A:C:o:S:' opt
@@ -313,9 +314,11 @@ checkopts()
COMPILE_LITE="on"
if [[ "$OPTARG" == "cpp" ]]; then
LITE_LANGUAGE="cpp"
ANDROID_STL="c++_shared"
elif [[ "$OPTARG" == "java" ]]; then
LITE_LANGUAGE="java"
ENABLE_CONVERTER="off"
ANDROID_STL="c++_static"
elif [[ "$OPTARG" == "object-c" ]]; then
LITE_LANGUAGE="object-c"
else
@@ -669,7 +672,7 @@ build_lite()
checkndk
cmake -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" -DANDROID_NATIVE_API_LEVEL="19" \
-DANDROID_NDK="${ANDROID_NDK}" -DANDROID_ABI="arm64-v8a" -DANDROID_TOOLCHAIN_NAME="aarch64-linux-android-clang" \
-DANDROID_STL="c++_static" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSUPPORT_TRAIN=${SUPPORT_TRAIN} \
-DANDROID_STL=${ANDROID_STL} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSUPPORT_TRAIN=${SUPPORT_TRAIN} \
-DPLATFORM_ARM64=on -DENABLE_NEON=on -DENABLE_FP16="off" \
-DENABLE_TOOLS=${ENABLE_TOOLS} -DENABLE_CONVERTER=${ENABLE_CONVERTER} -DBUILD_TESTCASES=${RUN_TESTCASES} \
-DSUPPORT_GPU=${ENABLE_GPU} -DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \
@@ -680,7 +683,7 @@ build_lite()
checkndk
cmake -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" -DANDROID_NATIVE_API_LEVEL="19" \
-DANDROID_NDK="${ANDROID_NDK}" -DANDROID_ABI="armeabi-v7a" -DANDROID_TOOLCHAIN_NAME="clang" \
-DANDROID_STL="c++_static" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DANDROID_STL=${ANDROID_STL} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DPLATFORM_ARM32=on -DENABLE_NEON=on -DSUPPORT_TRAIN=${SUPPORT_TRAIN} \
-DENABLE_TOOLS=${ENABLE_TOOLS} -DENABLE_CONVERTER=${ENABLE_CONVERTER} -DBUILD_TESTCASES=${RUN_TESTCASES} \
-DSUPPORT_GPU=${ENABLE_GPU} -DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \


mindspore/lite/nnacl/int8/common_func.c → mindspore/lite/nnacl/int8/common_func_int8.c View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "nnacl/int8/common_func.h"
#include "nnacl/int8/common_func_int8.h"
#include "nnacl/quantization/fixed_point.h"

void PostConvFuncCommInt8(const int32_t *in, int8_t *out, const int32_t *bias, size_t oc, size_t plane,

mindspore/lite/nnacl/int8/common_func.h → mindspore/lite/nnacl/int8/common_func_int8.h View File


+ 1
- 1
mindspore/lite/nnacl/int8/conv_depthwise_int8.c View File

@@ -17,7 +17,7 @@
#include "nnacl/int8/conv_depthwise_int8.h"
#include <string.h>
#include "nnacl/quantization/fixed_point.h"
#include "nnacl/int8/common_func.h"
#include "nnacl/int8/common_func_int8.h"

/*conv depthwise int8 begin*/
#ifndef ENABLE_ARM


+ 1
- 1
mindspore/lite/nnacl/int8/conv_int8.c View File

@@ -17,7 +17,7 @@
#include "nnacl/int8/conv_int8.h"
#include <string.h>
#include "nnacl/winograd_transform.h"
#include "nnacl/int8/common_func.h"
#include "nnacl/int8/common_func_int8.h"

void Conv3x3Int8Gemm(int32_t *dst, const int16_t *src, const int16_t *weight, int oc, int ic8, size_t real_cal_num) {
int oc4 = UP_DIV(oc, C4NUM);


mindspore/lite/nnacl/int8/deconv.c → mindspore/lite/nnacl/int8/deconv_int8.c View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/

#include "nnacl/int8/deconv.h"
#include "nnacl/int8/deconv_int8.h"
#include "nnacl/int8/matmul_int8.h"
#include "nnacl/int8/common_func.h"
#include "nnacl/int8/common_func_int8.h"
int DeConvPostInt8C8(const int32_t *src, const int32_t *bias, int32_t *tmp, int8_t *out, int output_channel,
ConvParameter *conv_param) {
/* row8x8-major(ih*iw x oc*kh*kw) -> row8-major(oh*ow x oc) */

mindspore/lite/nnacl/int8/deconv.h → mindspore/lite/nnacl/int8/deconv_int8.h View File


mindspore/lite/nnacl/int8/pad.c → mindspore/lite/nnacl/int8/pad_int8.c View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "nnacl/int8/pad.h"
#include "nnacl/int8/pad_int8.h"
#include "nnacl/common_func.h"
#include "nnacl/errorcode.h"


mindspore/lite/nnacl/int8/pad.h → mindspore/lite/nnacl/int8/pad_int8.h View File


mindspore/lite/nnacl/int8/quant_dtype_cast.c → mindspore/lite/nnacl/int8/quant_dtype_cast_int8.c View File

@@ -15,7 +15,7 @@
*/

#include <math.h>
#include "nnacl/int8/quant_dtype_cast.h"
#include "nnacl/int8/quant_dtype_cast_int8.h"
#include "nnacl/errorcode.h"

int DoDequantizeInt8ToFp32(int8_t *quant_values, float *real_values, float scale, int32_t zp, int size) {

mindspore/lite/nnacl/int8/quant_dtype_cast.h → mindspore/lite/nnacl/int8/quant_dtype_cast_int8.h View File


mindspore/lite/nnacl/int8/resize.c → mindspore/lite/nnacl/int8/resize_int8.c View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include <math.h>
#include "nnacl/int8/resize.h"
#include "nnacl/int8/resize_int8.h"
#include "nnacl/common_func.h"
#include "nnacl/quantization/fixed_point.h"
#include "nnacl/errorcode.h"

mindspore/lite/nnacl/int8/resize.h → mindspore/lite/nnacl/int8/resize_int8.h View File


+ 37
- 0
mindspore/lite/src/ops/populate/add_populate.cc View File

@@ -0,0 +1,37 @@
/**
* 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/add.h"
#include "src/ops/primitive_c.h"
#include "src/ops/populate/populate_register.h"
#include "nnacl/arithmetic_common.h"
#include "src/ops/populate/arithmetic_populate.h"

namespace mindspore {
namespace lite {
OpParameter *PopulateAddParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
param->activation_type_ = reinterpret_cast<const mindspore::lite::Add *>(primitive)->GetActivationType();
return reinterpret_cast<OpParameter *>(param);
}
Registry AddParameterRegistry(schema::PrimitiveType_Add, PopulateAddParameter);

} // namespace lite
} // namespace mindspore

+ 3
- 75
mindspore/lite/src/ops/populate/arithmetic_populate.cc View File

@@ -13,13 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "src/ops/populate/arithmetic_populate.h"
#include "src/ops/arithmetic.h"
#include "src/ops/add.h"
#include "src/ops/sub.h"
#include "src/ops/mul.h"
#include "src/ops/div.h"
#include "src/ops/eltwise.h"
#include "src/ops/greater_equal.h"
#include "src/common/log_adapter.h"
#include "src/tensor.h"
#include "src/ops/primitive_c.h"
@@ -27,6 +23,7 @@

namespace mindspore {
namespace lite {

ArithmeticParameter *PopulateArithmeticCommonPara(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = reinterpret_cast<ArithmeticParameter *>(malloc(sizeof(ArithmeticParameter)));
if (param == nullptr) {
@@ -57,70 +54,6 @@ OpParameter *PopulateArithmetic(const mindspore::lite::PrimitiveC *primitive) {
return reinterpret_cast<OpParameter *>(param);
}

OpParameter *PopulateAddParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
param->activation_type_ = reinterpret_cast<const mindspore::lite::Add *>(primitive)->GetActivationType();
return reinterpret_cast<OpParameter *>(param);
}

OpParameter *PopulateSubParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
param->activation_type_ = reinterpret_cast<const mindspore::lite::Sub *>(primitive)->GetActivationType();
return reinterpret_cast<OpParameter *>(param);
}

OpParameter *PopulateMulParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
param->activation_type_ = reinterpret_cast<const mindspore::lite::Mul *>(primitive)->GetActivationType();
return reinterpret_cast<OpParameter *>(param);
}

OpParameter *PopulateDivParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
param->activation_type_ = reinterpret_cast<const mindspore::lite::Div *>(primitive)->GetActivationType();
return reinterpret_cast<OpParameter *>(param);
}

OpParameter *PopulateEltwiseParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
auto eltwise = reinterpret_cast<const mindspore::lite::Eltwise *>(primitive);
switch (eltwise->GetMode()) {
case schema::EltwiseMode_PROD:
param->op_parameter_.type_ = schema::PrimitiveType_Mul;
break;
case schema::EltwiseMode_SUM:
param->op_parameter_.type_ = schema::PrimitiveType_Add;
break;
case schema::EltwiseMode_MAXIMUM:
param->op_parameter_.type_ = schema::PrimitiveType_Maximum;
break;
default:
free(param);
return nullptr;
}
return reinterpret_cast<OpParameter *>(param);
}

Registry RealDivParameterRegistry(schema::PrimitiveType_RealDiv, PopulateArithmetic);
Registry LogicalAndParameterRegistry(schema::PrimitiveType_LogicalAnd, PopulateArithmetic);
Registry ParameterRegistry(schema::PrimitiveType_LogicalOr, PopulateArithmetic);
@@ -135,10 +68,5 @@ Registry MinimumParameterRegistry(schema::PrimitiveType_Minimum, PopulateArithme
Registry FloorDivParameterRegistry(schema::PrimitiveType_FloorDiv, PopulateArithmetic);
Registry FloorModParameterRegistry(schema::PrimitiveType_FloorMod, PopulateArithmetic);
Registry SquaredDifferenceParameterRegistry(schema::PrimitiveType_SquaredDifference, PopulateArithmetic);
Registry AddParameterRegistry(schema::PrimitiveType_Add, PopulateAddParameter);
Registry SubParameterRegistry(schema::PrimitiveType_Sub, PopulateSubParameter);
Registry MulParameterRegistry(schema::PrimitiveType_Mul, PopulateMulParameter);
Registry DivParameterRegistry(schema::PrimitiveType_Div, PopulateDivParameter);
Registry EltwiseParameterRegistry(schema::PrimitiveType_Eltwise, PopulateEltwiseParameter);
} // namespace lite
} // namespace mindspore

+ 23
- 0
mindspore/lite/src/ops/populate/arithmetic_populate.h View File

@@ -0,0 +1,23 @@
/**
* 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 {
ArithmeticParameter *PopulateArithmeticCommonPara(const mindspore::lite::PrimitiveC *primitive);
} // namespace lite
} // namespace mindspore

+ 37
- 0
mindspore/lite/src/ops/populate/div_populate.cc View File

@@ -0,0 +1,37 @@
/**
* 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/div.h"
#include "src/ops/primitive_c.h"
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/arithmetic_populate.h"
namespace mindspore {
namespace lite {

OpParameter *PopulateDivParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
param->activation_type_ = reinterpret_cast<const mindspore::lite::Div *>(primitive)->GetActivationType();
return reinterpret_cast<OpParameter *>(param);
}

Registry DivParameterRegistry(schema::PrimitiveType_Div, PopulateDivParameter);

} // namespace lite
} // namespace mindspore

+ 52
- 0
mindspore/lite/src/ops/populate/eltwise_populate.cc View File

@@ -0,0 +1,52 @@
/**
* 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/div.h"
#include "src/ops/eltwise.h"
#include "src/ops/primitive_c.h"
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/arithmetic_populate.h"
namespace mindspore {
namespace lite {

OpParameter *PopulateEltwiseParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
auto eltwise = reinterpret_cast<const mindspore::lite::Eltwise *>(primitive);
switch (eltwise->GetMode()) {
case schema::EltwiseMode_PROD:
param->op_parameter_.type_ = schema::PrimitiveType_Mul;
break;
case schema::EltwiseMode_SUM:
param->op_parameter_.type_ = schema::PrimitiveType_Add;
break;
case schema::EltwiseMode_MAXIMUM:
param->op_parameter_.type_ = schema::PrimitiveType_Maximum;
break;
default:
free(param);
return nullptr;
}
return reinterpret_cast<OpParameter *>(param);
}

Registry EltwiseParameterRegistry(schema::PrimitiveType_Eltwise, PopulateEltwiseParameter);

} // namespace lite
} // namespace mindspore

+ 39
- 0
mindspore/lite/src/ops/populate/mul_populate.cc View File

@@ -0,0 +1,39 @@
/**
* 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/mul.h"
#include "nnacl/arithmetic_common.h"
#include "src/ops/primitive_c.h"
#include "src/ops/populate/populate_register.h"
#include "src/ops/populate/arithmetic_populate.h"

namespace mindspore {
namespace lite {

OpParameter *PopulateMulParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
param->activation_type_ = reinterpret_cast<const mindspore::lite::Mul *>(primitive)->GetActivationType();
return reinterpret_cast<OpParameter *>(param);
}

Registry MulParameterRegistry(schema::PrimitiveType_Mul, PopulateMulParameter);

} // namespace lite
} // namespace mindspore

+ 1
- 1
mindspore/lite/src/ops/populate/quant_dtype_cast_populate.cc View File

@@ -17,7 +17,7 @@
#include "src/ops/quant_dtype_cast.h"
#include "src/ops/primitive_c.h"
#include "src/ops/populate/populate_register.h"
#include "nnacl/int8/quant_dtype_cast.h"
#include "nnacl/int8/quant_dtype_cast_int8.h"

namespace mindspore {
namespace lite {


+ 39
- 0
mindspore/lite/src/ops/populate/sub_populate.cc View File

@@ -0,0 +1,39 @@
/**
* 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/sub.h"
#include "src/ops/primitive_c.h"
#include "src/ops/populate/populate_register.h"
#include "nnacl/arithmetic_common.h"
#include "src/ops/populate/arithmetic_populate.h"

namespace mindspore {
namespace lite {

OpParameter *PopulateSubParameter(const mindspore::lite::PrimitiveC *primitive) {
ArithmeticParameter *param = PopulateArithmeticCommonPara(primitive);
if (param == nullptr) {
MS_LOG(ERROR) << "PopulateArithmeticCommonPara failed.";
return nullptr;
}
param->activation_type_ = reinterpret_cast<const mindspore::lite::Sub *>(primitive)->GetActivationType();
return reinterpret_cast<OpParameter *>(param);
}

Registry SubParameterRegistry(schema::PrimitiveType_Sub, PopulateSubParameter);

} // namespace lite
} // namespace mindspore

+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/base/detection_post_process_base.cc View File

@@ -18,7 +18,7 @@
#include "schema/model_generated.h"
#include "src/kernel_registry.h"
#include "include/errorcode.h"
#include "nnacl/int8/quant_dtype_cast.h"
#include "nnacl/int8/quant_dtype_cast_int8.h"

using mindspore::kernel::KERNEL_ARCH::kCPU;
using mindspore::lite::RET_ERROR;


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/base/quant_dtype_cast.cc View File

@@ -15,7 +15,7 @@
*/
#include "src/runtime/kernel/arm/base/quant_dtype_cast.h"
#include <vector>
#include "nnacl/int8/quant_dtype_cast.h"
#include "nnacl/int8/quant_dtype_cast_int8.h"
#include "src/runtime/runtime_api.h"
#include "src/kernel_registry.h"
#include "schema/model_generated.h"


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/fp16/quant_dtype_cast_fp16.cc View File

@@ -15,7 +15,7 @@
*/
#include "src/runtime/kernel/arm/fp16/quant_dtype_cast_fp16.h"
#include <vector>
#include "nnacl/int8/quant_dtype_cast.h"
#include "nnacl/int8/quant_dtype_cast_int8.h"
#include "nnacl/fp16/quant_dtype_cast_fp16.h"
#include "src/runtime/runtime_api.h"
#include "src/kernel_registry.h"


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/fp32/detection_post_process.cc View File

@@ -18,7 +18,7 @@
#include "schema/model_generated.h"
#include "src/kernel_registry.h"
#include "include/errorcode.h"
#include "nnacl/int8/quant_dtype_cast.h"
#include "nnacl/int8/quant_dtype_cast_int8.h"

using mindspore::lite::KernelRegistrar;
using mindspore::lite::RET_ERROR;


mindspore/lite/src/runtime/kernel/arm/int8/activation.cc → mindspore/lite/src/runtime/kernel/arm/int8/activation_int8.cc View File


+ 2
- 2
mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_int8.h View File

@@ -22,8 +22,8 @@
#include "src/kernel_registry.h"
#include "include/errorcode.h"
#include "nnacl/matmul_parameter.h"
#include "nnacl/int8/deconv.h"
#include "nnacl/int8/common_func.h"
#include "nnacl/int8/deconv_int8.h"
#include "nnacl/int8/common_func_int8.h"
#include "nnacl/int8/matmul_int8.h"
#include "src/runtime/kernel/arm/base/layout_transform.h"
#include "src/runtime/kernel/arm/base/convolution_base.h"


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/int8/detection_post_process_int8.cc View File

@@ -18,7 +18,7 @@
#include "schema/model_generated.h"
#include "src/kernel_registry.h"
#include "include/errorcode.h"
#include "nnacl/int8/quant_dtype_cast.h"
#include "nnacl/int8/quant_dtype_cast_int8.h"

using mindspore::lite::KernelRegistrar;
using mindspore::lite::RET_ERROR;


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/int8/fullconnection_int8.h View File

@@ -21,7 +21,7 @@
#include "src/runtime/kernel/arm/base/fullconnection_base.h"
#include "include/context.h"
#include "nnacl/quantization/quantize.h"
#include "nnacl/int8/common_func.h"
#include "nnacl/int8/common_func_int8.h"

using mindspore::lite::InnerContext;



+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/int8/pad_int8.cc View File

@@ -18,7 +18,7 @@
#include <string>
#include "include/errorcode.h"
#include "nnacl/errorcode.h"
#include "nnacl/int8/pad.h"
#include "nnacl/int8/pad_int8.h"
#include "src/runtime/runtime_api.h"
#include "src/kernel_registry.h"



+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/int8/pad_int8.h View File

@@ -21,7 +21,7 @@
#include "src/lite_kernel.h"
#include "src/runtime/runtime_api.h"
#include "nnacl/pad_parameter.h"
#include "nnacl/int8/pad.h"
#include "nnacl/int8/pad_int8.h"

namespace mindspore::kernel {
class PadInt8CPUKernel : public LiteKernel {


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/int8/resize_int8.cc View File

@@ -17,7 +17,7 @@
#include "src/runtime/kernel/arm/int8/resize_int8.h"
#include <vector>
#include "include/errorcode.h"
#include "nnacl/int8/resize.h"
#include "nnacl/int8/resize_int8.h"
#include "schema/model_generated.h"
#include "src/kernel_registry.h"
#include "src/runtime/runtime_api.h"


+ 1
- 1
mindspore/lite/test/ut/src/runtime/kernel/arm/int8/deconv_int8_tests.cc View File

@@ -22,7 +22,7 @@
#include "mindspore/lite/src/kernel_registry.h"
#include "mindspore/lite/nnacl/pack.h"
#include "mindspore/lite/nnacl/fp32/matmul.h"
#include "mindspore/lite/nnacl/int8/deconv.h"
#include "mindspore/lite/nnacl/int8/deconv_int8.h"
#include "mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_int8.h"

using mindspore::lite::DeviceType;


+ 1
- 1
mindspore/lite/test/ut/src/runtime/kernel/arm/int8/quant_dtype_cast_tests.cc View File

@@ -19,7 +19,7 @@
#include "src/common/log_adapter.h"
#include "common/common_test.h"
#include "mindspore/lite/src/runtime/kernel/arm/base/quant_dtype_cast.h"
#include "mindspore/lite/nnacl/int8/quant_dtype_cast.h"
#include "mindspore/lite/nnacl/int8/quant_dtype_cast_int8.h"
#include "mindspore/lite/src/kernel_registry.h"
#include "mindspore/lite/src/lite_kernel.h"



+ 1
- 1
mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_bilinear_int8_tests.cc View File

@@ -20,7 +20,7 @@
#include "src/tensor.h"
#include "common/common_test.h"
#include "src/kernel_registry.h"
#include "nnacl/int8/resize.h"
#include "nnacl/int8/resize_int8.h"

namespace mindspore {
using mindspore::lite::QuantArg;


+ 1
- 1
mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_nearest_neighbor_int8_tests.cc View File

@@ -20,7 +20,7 @@
#include "src/tensor.h"
#include "common/common_test.h"
#include "src/kernel_registry.h"
#include "nnacl/int8/resize.h"
#include "nnacl/int8/resize_int8.h"

namespace mindspore {
using mindspore::lite::QuantArg;


Loading…
Cancel
Save