From c7543a437ea82c04d35f606cd98206b86e0ee50d Mon Sep 17 00:00:00 2001 From: xuanyue Date: Mon, 12 Jul 2021 11:40:35 +0800 Subject: [PATCH] fix nnie compile --- mindspore/lite/test/st/run_benchmark_nets.sh | 13 ++++++------- mindspore/lite/tools/benchmark/CMakeLists.txt | 3 +++ mindspore/lite/tools/benchmark/benchmark_base.h | 4 ++++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/mindspore/lite/test/st/run_benchmark_nets.sh b/mindspore/lite/test/st/run_benchmark_nets.sh index 6826087281c..000f6e1fe62 100644 --- a/mindspore/lite/test/st/run_benchmark_nets.sh +++ b/mindspore/lite/test/st/run_benchmark_nets.sh @@ -137,11 +137,10 @@ if [[ $backend == "all" || $backend == "x86-all" || $backend == "x86" || $backen fi if [[ $backend == "all" || $backend == "arm32_3516D" ]]; then - exit 0 -# sh $cur_path/scripts/nnie/run_converter_nnie.sh -r $release_path -m $models_path -d $device_id -e $backend -# hi3516_status=$? -# if [[ $hi3516_status -ne 0 ]]; then -# echo "Run nnie hi3516 failed" -# exit 1 -# fi + sh $cur_path/scripts/nnie/run_converter_nnie.sh -r $release_path -m $models_path -d $device_id -e $backend + hi3516_status=$? + if [[ $hi3516_status -ne 0 ]]; then + echo "Run nnie hi3516 failed" + exit 1 + fi fi diff --git a/mindspore/lite/tools/benchmark/CMakeLists.txt b/mindspore/lite/tools/benchmark/CMakeLists.txt index 5f0dde86366..d74611071b5 100644 --- a/mindspore/lite/tools/benchmark/CMakeLists.txt +++ b/mindspore/lite/tools/benchmark/CMakeLists.txt @@ -35,7 +35,10 @@ if(MSLITE_COMPILE_NNIE AND TARGET_HIMIX200 AND PLATFORM_ARM) add_executable(benchmark ${CMAKE_CURRENT_SOURCE_DIR}/main.cc + ${CMAKE_CURRENT_SOURCE_DIR}/run_benchmark.cc + ${CMAKE_CURRENT_SOURCE_DIR}/benchmark_base.cc ${CMAKE_CURRENT_SOURCE_DIR}/benchmark.cc + ${CMAKE_CURRENT_SOURCE_DIR}/benchmark_unified_api.cc ${COMMON_SRC}) add_dependencies(benchmark fbs_src) diff --git a/mindspore/lite/tools/benchmark/benchmark_base.h b/mindspore/lite/tools/benchmark/benchmark_base.h index ced7a3fc38b..af94d0e5394 100644 --- a/mindspore/lite/tools/benchmark/benchmark_base.h +++ b/mindspore/lite/tools/benchmark/benchmark_base.h @@ -312,5 +312,9 @@ class MS_API BenchmarkBase { std::mt19937 random_engine_; }; +#ifdef SUPPORT_NNIE +int SvpSysInit(); +int SvpSysExit(); +#endif } // namespace mindspore::lite #endif // MINNIE_BENCHMARK_BENCHMARK_BASE_H_