change nnie_converter so relative path

This commit is contained in:
zhaodezan 2021-06-22 21:51:43 +08:00
parent 3d7fc460b2
commit c6b633730d
5 changed files with 9 additions and 2 deletions

View File

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

View File

@ -23,6 +23,7 @@
#include <vector>
#include <memory>
#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");

View File

@ -0,0 +1 @@
plugin_path=./providers/3516D/libmslite_nnie_converter.so