diff --git a/cmake/package_lite.cmake b/cmake/package_lite.cmake index fb0724b47fe..f14bb32f463 100644 --- a/cmake/package_lite.cmake +++ b/cmake/package_lite.cmake @@ -256,16 +256,22 @@ elseif(PLATFORM_ARM32) install(DIRECTORY ${TOP_DIR}/include/api/ DESTINATION ${RUNTIME_INC_DIR}/api COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h" PATTERN "ops*" EXCLUDE) __install_micro_wrapper() - if(MSLITE_ENABLE_TOOLS) - install(TARGETS ${BENCHMARK_NAME} RUNTIME DESTINATION ${BENCHMARK_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) - if(SUPPORT_TRAIN) - install(TARGETS ${BENCHMARK_TRAIN_NAME} RUNTIME DESTINATION ${BENCHMARK_TRAIN_ROOT_DIR} COMPONENT - ${RUNTIME_COMPONENT_NAME}) - endif() - endif() if(MSLITE_ENABLE_NNIE AND TARGET_HIMIX200) install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie.so DESTINATION ${RUNTIME_PKG_NAME}/providers/3516D COMPONENT ${RUNTIME_COMPONENT_NAME}) + install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libnnie_proposal.so + DESTINATION ${RUNTIME_PKG_NAME}/providers/3516D COMPONENT ${RUNTIME_COMPONENT_NAME}) + install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/benchmark + DESTINATION ${RUNTIME_PKG_NAME}/providers/3516D COMPONENT ${RUNTIME_COMPONENT_NAME}) + else() + if(MSLITE_ENABLE_TOOLS) + install(TARGETS ${BENCHMARK_NAME} RUNTIME DESTINATION ${BENCHMARK_ROOT_DIR} + COMPONENT ${RUNTIME_COMPONENT_NAME}) + if(SUPPORT_TRAIN) + install(TARGETS ${BENCHMARK_TRAIN_NAME} RUNTIME DESTINATION ${BENCHMARK_TRAIN_ROOT_DIR} + COMPONENT ${RUNTIME_COMPONENT_NAME}) + endif() + endif() endif() elseif(WIN32) get_filename_component(CXX_DIR ${CMAKE_CXX_COMPILER} PATH) @@ -370,9 +376,11 @@ else() install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_npu.cfg DESTINATION ${CROPPER_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) endif() - if(NOT SUPPORT_TRAIN AND MSLITE_ENABLE_NNIE) + if(NOT SUPPORT_TRAIN) install(DIRECTORY ${TOP_DIR}/mindspore/lite/build/schema/ DESTINATION ${CONVERTER_ROOT_DIR}/include/schema COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h") + endif() + if(NOT SUPPORT_TRAIN AND MSLITE_ENABLE_NNIE) install(DIRECTORY ${TOP_DIR}/mindspore/core/abstract/ DESTINATION ${CONVERTER_ROOT_DIR}/include/core/abstract COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h") install(DIRECTORY ${TOP_DIR}/mindspore/core/base/ DESTINATION ${CONVERTER_ROOT_DIR}/include/core/base @@ -390,12 +398,16 @@ else() file(GLOB PROTOBUF_LIB_PATH ${TOP_DIR}/mindspore/lite/build/.mslib/protobuf_*/lib/libprotobuf.a) install(FILES ${PROTOBUF_LIB_PATH} DESTINATION ${CONVERTER_ROOT_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) - install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_converter.so + install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libmslite_converter_plugin.so DESTINATION ${CONVERTER_ROOT_DIR}/providers/3516D/ COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_data_process.so DESTINATION ${CONVERTER_ROOT_DIR}/providers/3516D COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libnnie_mapper.so DESTINATION ${CONVERTER_ROOT_DIR}/providers/3516D COMPONENT ${RUNTIME_COMPONENT_NAME}) + install(FILES ${TOP_DIR}/mindspore/ccsrc/backend/optimizer/common/pass.h + DESTINATION ${CONVERTER_ROOT_DIR}/include COMPONENT ${RUNTIME_COMPONENT_NAME}) + install(FILES ${TOP_DIR}/mindspore/lite/tools/converter/model_parser.h + DESTINATION ${CONVERTER_ROOT_DIR}/include COMPONENT ${RUNTIME_COMPONENT_NAME}) install(DIRECTORY ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/opencv-4.2.0/lib/ DESTINATION ${CONVERTER_ROOT_DIR}/providers/3516D/third_party/opencv-4.2.0 COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.so*") diff --git a/mindspore/lite/tools/benchmark/CMakeLists.txt b/mindspore/lite/tools/benchmark/CMakeLists.txt index 20a74c3217b..f1bb8bb930e 100644 --- a/mindspore/lite/tools/benchmark/CMakeLists.txt +++ b/mindspore/lite/tools/benchmark/CMakeLists.txt @@ -4,20 +4,22 @@ set(COMMON_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../src/common/file_utils.cc ${CMAKE_CURRENT_SOURCE_DIR}/../../src/common/utils.cc ) +if(NOT TARGET_HIMIX200) + add_executable(benchmark + ${CMAKE_CURRENT_SOURCE_DIR}/main.cc + ${CMAKE_CURRENT_SOURCE_DIR}/benchmark.cc + ${COMMON_SRC}) -add_executable(benchmark - ${CMAKE_CURRENT_SOURCE_DIR}/main.cc - ${CMAKE_CURRENT_SOURCE_DIR}/benchmark.cc - ${COMMON_SRC}) + add_dependencies(benchmark fbs_src) -add_dependencies(benchmark fbs_src) - -if(PLATFORM_ARM32 OR PLATFORM_ARM64 AND NOT TARGET_HIMIX200) - if(SUPPORT_NPU AND ANDROID_STL STREQUAL "c++_static") - target_link_libraries(benchmark mindspore-lite mindspore::json c++_shared) + if(PLATFORM_ARM32 OR PLATFORM_ARM64) + if(SUPPORT_NPU AND ANDROID_STL STREQUAL "c++_static") + target_link_libraries(benchmark mindspore-lite mindspore::json c++_shared) + else() + target_link_libraries(benchmark mindspore-lite mindspore::json) + endif() else() - target_link_libraries(benchmark mindspore-lite mindspore::json) + target_link_libraries(benchmark mindspore-lite mindspore::json pthread) endif() -else() - target_link_libraries(benchmark mindspore-lite mindspore::json pthread) endif() + diff --git a/mindspore/lite/tools/providers/NNIE/3516D/benchmark b/mindspore/lite/tools/providers/NNIE/3516D/benchmark new file mode 100644 index 00000000000..dba8ffe1413 Binary files /dev/null and b/mindspore/lite/tools/providers/NNIE/3516D/benchmark differ diff --git a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_converter_plugin.so b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_converter_plugin.so new file mode 100755 index 00000000000..d7e492a8d19 Binary files /dev/null and b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_converter_plugin.so differ diff --git a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie.so b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie.so new file mode 100644 index 00000000000..83a24fc6d54 Binary files /dev/null and b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie.so differ diff --git a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_converter.so b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_converter.so deleted file mode 100755 index 054eab0e436..00000000000 Binary files a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_converter.so and /dev/null differ diff --git a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_data_process.so b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_data_process.so index f08583752af..db657392b6e 100755 Binary files a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_data_process.so and b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_data_process.so differ diff --git a/mindspore/lite/tools/providers/NNIE/3516D/libnnie_mapper.so b/mindspore/lite/tools/providers/NNIE/3516D/libnnie_mapper.so index 84c48f905be..db61e9f1873 100755 Binary files a/mindspore/lite/tools/providers/NNIE/3516D/libnnie_mapper.so and b/mindspore/lite/tools/providers/NNIE/3516D/libnnie_mapper.so differ diff --git a/mindspore/lite/tools/providers/NNIE/3516D/libnnie_proposal.so b/mindspore/lite/tools/providers/NNIE/3516D/libnnie_proposal.so new file mode 100644 index 00000000000..2a6ad6729ed Binary files /dev/null and b/mindspore/lite/tools/providers/NNIE/3516D/libnnie_proposal.so differ