diff --git a/lite/CMakeLists.txt b/lite/CMakeLists.txt index 1e1ef1ec8aa79bbb1bf1aa8a3cc96413ad80c08a..39985d5b9c30b1b634c390a58eed0666fad2462f 100644 --- a/lite/CMakeLists.txt +++ b/lite/CMakeLists.txt @@ -59,6 +59,9 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) if (LITE_WITH_OPENCL) set(INFER_LITE_PUBLISH_ROOT "${INFER_LITE_PUBLISH_ROOT}.opencl") endif(LITE_WITH_OPENCL) + if (LITE_WITH_NPU) + set(INFER_LITE_PUBLISH_ROOT "${INFER_LITE_PUBLISH_ROOT}.npu") + endif(LITE_WITH_NPU) message(STATUS "publish inference lib to ${INFER_LITE_PUBLISH_ROOT}") # The final target for publish lite lib diff --git a/lite/model_parser/CMakeLists.txt b/lite/model_parser/CMakeLists.txt index d9871ff177b0006fa0c9bbfede4339256d6853e5..2df9b97e552e00e0c04faa0f4995cf9ef348b84e 100644 --- a/lite/model_parser/CMakeLists.txt +++ b/lite/model_parser/CMakeLists.txt @@ -28,6 +28,7 @@ lite_cc_library(model_parser SRCS model_parser.cc DEPS target_wrapper_host compatible_pb memory - CUDA_DEPS target_wrapper_cuda) + CUDA_DEPS target_wrapper_cuda + NPU_DEPS npu_helper) lite_cc_test(test_compatible_pb SRCS compatible_pb_test.cc DEPS compatible_pb) diff --git a/lite/tools/build_npu.sh b/lite/tools/build_npu.sh index eb96508283c8d70cf28ecca398565a544135cc73..24bbd868a40dbec14e3eb14db55d418b598a44dd 100755 --- a/lite/tools/build_npu.sh +++ b/lite/tools/build_npu.sh @@ -107,7 +107,14 @@ function build_npu { test_name=$6 fi - build_dir=$cur_dir/build.lite.npu.${os}.${abi}.${lang}.${stl} + # the c++ symbol is not recognized by the bundled script + if [[ "${stl}" == "c++_shared" ]]; then + stl_dir="cxx_shared" + fi + if [[ "${stl}" == "c++_static" ]]; then + stl_dir="cxx_static" + fi + build_dir=$cur_dir/build.lite.npu.${os}.${abi}.${lang}.${stl_dir} mkdir -p $build_dir cd $build_dir