From b6ebee5efcdd2130e2fdbfa459a0e1f031b70716 Mon Sep 17 00:00:00 2001 From: youshu1 Date: Thu, 2 Feb 2023 20:04:54 +0800 Subject: [PATCH] [MS][LITE] Fix dvpp plugin search location for lite. --- cmake/package_lite.cmake | 5 +++-- mindspore/lite/build_lite.sh | 3 ++- mindspore/lite/python/setup.py | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cmake/package_lite.cmake b/cmake/package_lite.cmake index bfaae992a8e..48c4586d859 100644 --- a/cmake/package_lite.cmake +++ b/cmake/package_lite.cmake @@ -16,6 +16,7 @@ set(EXTENDRT_BUILD_DIR ${TOP_DIR}/mindspore/lite/build/src/extendrt) set(RUNTIME_DIR ${RUNTIME_PKG_NAME}/runtime) set(RUNTIME_INC_DIR ${RUNTIME_PKG_NAME}/runtime/include) set(RUNTIME_LIB_DIR ${RUNTIME_PKG_NAME}/runtime/lib) +set(RUNTIME_LIB_ACL_PLUGIN_DIR ${RUNTIME_PKG_NAME}/runtime/lib/lib/plugin/ascend) set(PROVIDERS_LIB_DIR ${RUNTIME_PKG_NAME}/providers) set(MIND_DATA_INC_DIR ${RUNTIME_PKG_NAME}/runtime/include/dataset) set(TURBO_DIR ${RUNTIME_PKG_NAME}/runtime/third_party/libjpeg-turbo) @@ -269,7 +270,7 @@ if(MSLITE_MINDDATA_IMPLEMENT STREQUAL "full") install(FILES ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision_ascend.h DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/kernels-dvpp-image/utils/libdvpp_utils.so - DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + DESTINATION ${RUNTIME_LIB_ACL_PLUGIN_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) endif() install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) @@ -291,7 +292,7 @@ if(MSLITE_MINDDATA_IMPLEMENT STREQUAL "full") install(FILES ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision_ascend.h DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/kernels-dvpp-image/utils/libdvpp_utils.so - DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + DESTINATION ${RUNTIME_LIB_ACL_PLUGIN_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) endif() install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) diff --git a/mindspore/lite/build_lite.sh b/mindspore/lite/build_lite.sh index 433e9a53dda..b0f2d419db9 100755 --- a/mindspore/lite/build_lite.sh +++ b/mindspore/lite/build_lite.sh @@ -196,7 +196,8 @@ build_python_wheel_package() { cp src/extendrt/kernel/ascend/*.so package/mindspore_lite/lib/ local dvpp_utils=minddata/kernels-dvpp-image/utils/libdvpp_utils.so if [ -f ${dvpp_utils} ]; then - cp ${dvpp_utils} package/mindspore_lite/lib/ + mkdir -pv package/mindspore_lite/lib/lib/plugin/ascend + cp ${dvpp_utils} package/mindspore_lite/lib/lib/plugin/ascend fi fi if [ -f "${INSTALL_PREFIX}/${pkg_name}/runtime/lib/libtransformer-shared.so" ]; then diff --git a/mindspore/lite/python/setup.py b/mindspore/lite/python/setup.py index 66f6d9c2ce0..ee4b034c12d 100644 --- a/mindspore/lite/python/setup.py +++ b/mindspore/lite/python/setup.py @@ -46,9 +46,9 @@ setup( long_description=readme, long_description_content_type="text/markdown", packages=find_packages(), - package_data={'': ['*.py', 'lib/*.so*', '.commit_id', 'include/api/*', 'include/api/callback/*', - 'include/api/metrics/*', 'include/mindapi/base/*', 'include/registry/converter_context.h', - 'include/converter.h']}, + package_data={'': ['*.py', 'lib/*.so*', 'lib/lib/plugin/ascend/*.so*', '.commit_id', 'include/api/*', + 'include/api/callback/*', 'include/api/metrics/*', 'include/mindapi/base/*', + 'include/registry/converter_context.h', 'include/converter.h']}, include_package_data=True, cmdclass={}, entry_points={},