From c7235c7e7e24e4322bee916463f6de14ee697ecf Mon Sep 17 00:00:00 2001 From: zhangxuetong Date: Wed, 12 Oct 2022 14:46:52 +0800 Subject: [PATCH] modify extendrt package --- cmake/package_lite.cmake | 22 +++++++++++++--------- mindspore/lite/CMakeLists.txt | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/cmake/package_lite.cmake b/cmake/package_lite.cmake index f8acd65e5e6..ee4347fe160 100644 --- a/cmake/package_lite.cmake +++ b/cmake/package_lite.cmake @@ -749,7 +749,7 @@ elseif(WIN32) ${opencv_LIBPATH}/../bin/libopencv_imgproc* ) install(FILES ${OPENCV_LIB_LIST} DESTINATION ${CONVERTER_ROOT_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) - if(NOT MSVC) + if(NOT MSVC AND NOT MSLITE_ENABLE_CLOUD_FUSION_INFERENCE) __install_micro_wrapper() __install_micro_codegen() endif() @@ -986,8 +986,10 @@ else() DESTINATION ${RUNTIME_LIB_DIR} RENAME libopencv_imgproc.so.4.5 COMPONENT ${RUNTIME_COMPONENT_NAME}) endif() - __install_micro_wrapper() - __install_micro_codegen() + if(NOT MSLITE_ENABLE_CLOUD_FUSION_INFERENCE) + __install_micro_wrapper() + __install_micro_codegen() + endif() endif() if(MSLITE_ENABLE_TOOLS) if(NOT MSLITE_COMPILE_TWICE) @@ -998,16 +1000,18 @@ else() install(TARGETS ${BENCHMARK_TRAIN_NAME} RUNTIME DESTINATION ${BENCHMARK_TRAIN_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) endif() - install(TARGETS cropper RUNTIME DESTINATION ${CROPPER_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) - install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_cpu.cfg + if(NOT MSLITE_ENABLE_CLOUD_FUSION_INFERENCE) + install(TARGETS cropper RUNTIME DESTINATION ${CROPPER_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_cpu.cfg DESTINATION ${CROPPER_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) - install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_gpu.cfg + install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_gpu.cfg DESTINATION ${CROPPER_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) - install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_npu.cfg + install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_npu.cfg DESTINATION ${CROPPER_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) - if(SUPPORT_TRAIN) - install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_cpu_train.cfg + if(SUPPORT_TRAIN) + install(FILES ${TOP_DIR}/mindspore/lite/build/tools/cropper/cropper_mapping_cpu_train.cfg DESTINATION ${CROPPER_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + endif() endif() endif() if(MSLITE_ENABLE_KERNEL_EXECUTOR) diff --git a/mindspore/lite/CMakeLists.txt b/mindspore/lite/CMakeLists.txt index c33fb49e854..fc4769bcb68 100644 --- a/mindspore/lite/CMakeLists.txt +++ b/mindspore/lite/CMakeLists.txt @@ -894,7 +894,7 @@ if(MSLITE_ENABLE_TOOLS) if(SUPPORT_TRAIN) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tools/benchmark_train) endif() - if(NOT PLATFORM_ARM AND NOT WIN32) + if(NOT PLATFORM_ARM AND NOT WIN32 AND NOT MSLITE_ENABLE_CLOUD_FUSION_INFERENCE) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tools/cropper) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tools/schema_gen) add_dependencies(fbs_src gen_ops)