diff --git a/cmake/package_lite.cmake b/cmake/package_lite.cmake index f14bb32f463..968d949c8b7 100644 --- a/cmake/package_lite.cmake +++ b/cmake/package_lite.cmake @@ -398,7 +398,9 @@ else() file(GLOB PROTOBUF_LIB_PATH ${TOP_DIR}/mindspore/lite/build/.mslib/protobuf_*/lib/libprotobuf.a) install(FILES ${PROTOBUF_LIB_PATH} DESTINATION ${CONVERTER_ROOT_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) - install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libmslite_converter_plugin.so + install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/converter.cfg + DESTINATION ${CONVERTER_ROOT_DIR}/ COMPONENT ${RUNTIME_COMPONENT_NAME}) + install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_converter.so DESTINATION ${CONVERTER_ROOT_DIR}/providers/3516D/ COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_data_process.so DESTINATION ${CONVERTER_ROOT_DIR}/providers/3516D COMPONENT ${RUNTIME_COMPONENT_NAME}) diff --git a/mindspore/lite/tools/converter/converter_flags.cc b/mindspore/lite/tools/converter/converter_flags.cc index 0469075a210..ee326a2fd60 100644 --- a/mindspore/lite/tools/converter/converter_flags.cc +++ b/mindspore/lite/tools/converter/converter_flags.cc @@ -23,6 +23,7 @@ #include #include #include "ir/dtype/type_id.h" +#include "common/file_utils.h" namespace mindspore { namespace lite { @@ -198,7 +199,10 @@ int Flags::InitConfigFile() { auto plugins_path_str = GetStrFromConfigFile(this->configFile, "plugin_path"); if (!plugins_path_str.empty()) { const char *delimiter = ";"; - this->pluginsPath = SplitStringToVector(plugins_path_str, *delimiter); + auto relative_path = SplitStringToVector(plugins_path_str, *delimiter); + for (size_t i = 0; i < relative_path.size(); i++) { + this->pluginsPath.push_back(RealPath(relative_path[i].c_str())); + } } auto disable_fusion_flag = GetStrFromConfigFile(this->configFile, "disable_fusion"); diff --git a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_converter_plugin.so b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_converter_plugin.so deleted file mode 100755 index d7e492a8d19..00000000000 Binary files a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_converter_plugin.so and /dev/null differ diff --git a/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_converter.so b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_converter.so new file mode 100755 index 00000000000..1b76d660b36 Binary files /dev/null and b/mindspore/lite/tools/providers/NNIE/3516D/libmslite_nnie_converter.so differ diff --git a/mindspore/lite/tools/providers/NNIE/converter.cfg b/mindspore/lite/tools/providers/NNIE/converter.cfg new file mode 100644 index 00000000000..5f9fd1cbdd7 --- /dev/null +++ b/mindspore/lite/tools/providers/NNIE/converter.cfg @@ -0,0 +1 @@ +plugin_path=./providers/3516D/libmslite_nnie_converter.so