!20398 [LITE] adapt npu 510 cmake

Merge pull request !20398 from zhaozhenlong/lite/issue/npu_510
This commit is contained in:
i-robot 2021-07-16 06:47:30 +00:00 committed by Gitee
commit e5c24e36f6
3 changed files with 10 additions and 0 deletions

View File

@ -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}

View File

@ -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)

View File

@ -58,6 +58,7 @@ set(API_TRAIN_SRC
if(SUPPORT_NPU)
include_directories(${DDK_PATH})
include_directories(${DDK_INCLUDE_PATH})
endif()
set(LITE_SRC