diff --git a/cmake/package_lite.cmake b/cmake/package_lite.cmake index d3d2556adcc..afe4bad04f8 100644 --- a/cmake/package_lite.cmake +++ b/cmake/package_lite.cmake @@ -185,6 +185,10 @@ if(PLATFORM_ARM64) COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${DDK_LIB_PATH}/libhiai_ir_build.so DESTINATION ${RUNTIME_DIR}/third_party/hiai_ddk/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) + if(EXISTS "${DDK_LIB_PATH}/libhiai_hcl_model_runtime.so") + install(FILES ${DDK_LIB_PATH}/libhiai_hcl_model_runtime.so + DESTINATION ${RUNTIME_DIR}/third_party/hiai_ddk/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) + endif() endif() if(SUPPORT_TRAIN) install(DIRECTORY ${TOP_DIR}/mindspore/lite/include/ DESTINATION ${RUNTIME_INC_DIR} @@ -239,6 +243,10 @@ elseif(PLATFORM_ARM32) COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${DDK_LIB_PATH}/libhiai_ir_build.so DESTINATION ${RUNTIME_DIR}/third_party/hiai_ddk/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) + if(EXISTS "${DDK_LIB_PATH}/libhiai_hcl_model_runtime.so") + install(FILES ${DDK_LIB_PATH}/libhiai_hcl_model_runtime.so + DESTINATION ${RUNTIME_DIR}/third_party/hiai_ddk/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) + endif() endif() if(SUPPORT_TRAIN) install(DIRECTORY ${TOP_DIR}/mindspore/lite/include/ DESTINATION ${RUNTIME_INC_DIR} diff --git a/mindspore/lite/CMakeLists.txt b/mindspore/lite/CMakeLists.txt index 1a9f224f1ab..5b24be5ad87 100644 --- a/mindspore/lite/CMakeLists.txt +++ b/mindspore/lite/CMakeLists.txt @@ -155,6 +155,7 @@ set(BUILD_MINDDATA "lite_cv" CACHE STRING "off, lite, lite_cv, wrapper or full") if(SUPPORT_NPU) set(DDK_PATH "$ENV{HWHIAI_DDK}/ddk/ai_ddk_lib") + set(DDK_INCLUDE_PATH "$ENV{HWHIAI_DDK}/ddk/ai_ddk_lib/include") if(PLATFORM_ARM64) set(DDK_LIB_PATH ${DDK_PATH}/lib64) elseif(PLATFORM_ARM32) diff --git a/mindspore/lite/src/CMakeLists.txt b/mindspore/lite/src/CMakeLists.txt index a53b70ab4e1..52a19c9d9ee 100644 --- a/mindspore/lite/src/CMakeLists.txt +++ b/mindspore/lite/src/CMakeLists.txt @@ -58,6 +58,7 @@ set(API_TRAIN_SRC if(SUPPORT_NPU) include_directories(${DDK_PATH}) + include_directories(${DDK_INCLUDE_PATH}) endif() set(LITE_SRC