forked from mindspore-Ecosystem/mindspore
!24726 [GE]] fix ge link so
Merge pull request !24726 from weiyang/fix_ge_link
This commit is contained in:
commit
b3096f3e4f
|
@ -241,11 +241,7 @@ endforeach()
|
|||
set_property(SOURCE ${SUB_OBJECTS_SRC} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_ME)
|
||||
add_library(mindspore STATIC ${SUB_OBJECTS_SRC})
|
||||
|
||||
if(ENABLE_GE)
|
||||
target_link_libraries(mindspore mindspore_core graph)
|
||||
else()
|
||||
target_link_libraries(mindspore mindspore_core)
|
||||
endif()
|
||||
target_link_libraries(mindspore mindspore_core)
|
||||
|
||||
if(ENABLE_DEBUGGER)
|
||||
# debugger: link grpc
|
||||
|
@ -258,15 +254,6 @@ if(NOT WIN32)
|
|||
target_link_libraries(mindspore dl)
|
||||
endif()
|
||||
|
||||
if(ENABLE_GE)
|
||||
if(ENABLE_TRAIN)
|
||||
target_link_libraries(mindspore ge_runner hccl)
|
||||
else()
|
||||
target_link_libraries(mindspore ge_runner)
|
||||
endif()
|
||||
target_link_libraries(mindspore tsdclient datatransfer ascendcl runtime)
|
||||
endif()
|
||||
|
||||
if(MODE_ASCEND_ALL OR MODE_ASCEND_ACL)
|
||||
# common env paths
|
||||
if(DEFINED ENV{D_LINK_PATH})
|
||||
|
@ -295,6 +282,13 @@ if(MODE_ASCEND_ALL OR MODE_ASCEND_ACL)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_GE)
|
||||
find_library(GE_RUNNER ge_runner ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
|
||||
find_library(GRAPH graph ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
|
||||
find_library(HCCL hccl ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
|
||||
target_link_libraries(mindspore ${GE_RUNNER} ${GRAPH} ${HCCL})
|
||||
endif()
|
||||
|
||||
if(MODE_ASCEND_ALL)
|
||||
MESSAGE("USE DAV LIB PATH: ${ASCEND_PATH}")
|
||||
find_library(ERROR_MANAGER error_manager ${ASCEND_RUNTIME_PATH} ${ASCEND_TOOLKIT_RUNTIME_PATH})
|
||||
|
|
Loading…
Reference in New Issue