!10018 rename 310 package name to "mindspore-ascend"

From: @zhoufeng54
Reviewed-by: @kisnwang,@xu-yfei
Signed-off-by: @xu-yfei
This commit is contained in:
mindspore-ci-bot 2020-12-16 09:30:26 +08:00 committed by Gitee
commit a6791e9a8c
3 changed files with 38 additions and 5 deletions

View File

@ -25,6 +25,10 @@ elseif (ENABLE_CPU)
set(CPACK_MS_BACKEND "ms")
set(CPACK_MS_TARGET "cpu")
set(CPACK_MS_PACKAGE_NAME "mindspore")
elseif (ENABLE_ACL)
set(CPACK_MS_BACKEND "debug")
set(CPACK_MS_TARGET "ascend-gpu-cpu")
set(CPACK_MS_PACKAGE_NAME "mindspore-ascend")
else ()
set(CPACK_MS_BACKEND "debug")
set(CPACK_MS_TARGET "ascend-gpu-cpu")
@ -115,11 +119,9 @@ if (ENABLE_MINDDATA)
DESTINATION ${INSTALL_LIB_DIR}
COMPONENT mindspore
)
file(GLOB_RECURSE TINYXML2_LIB_LIST
${tinyxml2_LIBPATH}/libtinyxml2*
)
file(GLOB_RECURSE TINYXML2_LIB_LIST ${tinyxml2_LIBPATH}/libtinyxml2*)
install(
FILES ${TINYXML2_LIB_LIST}
FILES ${TINYXML2_LIB_LIST}
DESTINATION ${INSTALL_LIB_DIR}
COMPONENT mindspore
)

View File

@ -89,3 +89,31 @@ if (ENABLE_D)
target_link_libraries(mindspore_shared_lib PRIVATE ${adump_server})
endif ()
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(MINDSPORE_RPATH $ORIGIN)
if (ENABLE_D)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/fwkacllib/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/ascend-toolkit/latest/fwkacllib/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/fwkacllib/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/fwkacllib/lib64/plugin/opskernel)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/ascend-toolkit/latest/fwkacllib/lib64/plugin/opskernel)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/fwkacllib/lib64/plugin/opskernel)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/add-ons)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/opp/op_impl/built-in/ai_core/tbe/op_tiling)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/opp/op_impl/built-in/ai_core/tbe/op_tiling)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe/op_tiling)
elseif (ENABLE_ACL)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/atc/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/ascend-toolkit/latest/atc/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/atc/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/acllib/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/ascend-toolkit/latest/acllib/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/acllib/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/add-ons)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/opp/op_impl/built-in/ai_core/tbe/op_tiling)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/opp/op_impl/built-in/ai_core/tbe/op_tiling)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe/op_tiling)
endif ()
set_target_properties(mindspore_shared_lib PROPERTIES INSTALL_RPATH ${MINDSPORE_RPATH})
endif ()

View File

@ -70,12 +70,15 @@ static Buffer ReadFile(const std::string &file) {
Graph Serialization::LoadModel(const std::string &file, ModelType model_type) {
Buffer data = ReadFile(file);
if (data.Data() == nullptr) {
MS_LOG(EXCEPTION) << "Read file " << file << " failed.";
}
if (model_type == kMindIR) {
FuncGraphPtr anf_graph = nullptr;
try {
anf_graph = ConvertStreamToFuncGraph(reinterpret_cast<const char *>(data.Data()), data.DataSize());
} catch (std::exception &e) {
MS_LOG(ERROR) << "Load MindIR failed.";
MS_LOG(EXCEPTION) << "Load MindIR failed.";
}
return Graph(std::make_shared<Graph::GraphData>(anf_graph, kMindIR));