forked from mindspore-Ecosystem/mindspore
!31664 fix grpc not found in gpu serving
Merge pull request !31664 from zhoufeng/xiu-ba-ge
This commit is contained in:
commit
32ecb8cbea
|
@ -285,15 +285,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
target_link_libraries(mindspore_common PRIVATE mindspore::pybind11_module)
|
target_link_libraries(mindspore_common PRIVATE mindspore::pybind11_module)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_DEBUGGER)
|
|
||||||
# debugger: link grpc
|
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
||||||
target_link_libraries(mindspore PUBLIC mindspore::grpc++)
|
|
||||||
else()
|
|
||||||
target_link_libraries(mindspore PUBLIC -Wl,--no-as-needed mindspore::grpc++)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(mindspore PUBLIC securec mindspore::flatbuffers)
|
target_link_libraries(mindspore PUBLIC securec mindspore::flatbuffers)
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
|
@ -363,9 +354,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
else()
|
else()
|
||||||
set_target_properties(mindspore_backend PROPERTIES INSTALL_RPATH $ORIGIN)
|
set_target_properties(mindspore_backend PROPERTIES INSTALL_RPATH $ORIGIN)
|
||||||
endif()
|
endif()
|
||||||
if(ENABLE_CPU AND NOT WIN32)
|
|
||||||
target_link_libraries(mindspore_backend PRIVATE ps_cache)
|
|
||||||
endif()
|
|
||||||
if(ENABLE_CPU)
|
if(ENABLE_CPU)
|
||||||
target_link_libraries(mindspore_backend PRIVATE mindspore::dnnl mindspore::mkldnn nnacl)
|
target_link_libraries(mindspore_backend PRIVATE mindspore::dnnl mindspore::mkldnn nnacl)
|
||||||
endif()
|
endif()
|
||||||
|
@ -383,6 +372,23 @@ if(ENABLE_GPU)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_DEBUGGER)
|
||||||
|
# debugger: link grpc
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
|
target_link_libraries(mindspore_backend PRIVATE mindspore::grpc++)
|
||||||
|
else()
|
||||||
|
target_link_libraries(mindspore_backend PRIVATE -Wl,--no-as-needed mindspore::grpc++)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
|
target_link_libraries(mindspore_backend PRIVATE mindspore::event mindspore::event_pthreads mindspore::event_openssl
|
||||||
|
mindspore::event_core ps_cache)
|
||||||
|
elseif(ENABLE_CPU AND NOT WIN32)
|
||||||
|
target_link_libraries(mindspore_backend PRIVATE mindspore::event mindspore::event_pthreads mindspore::event_openssl
|
||||||
|
-Wl,--no-as-needed mindspore::event_core ps_cache)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MODE_ASCEND_ALL OR MODE_ASCEND_ACL)
|
if(MODE_ASCEND_ALL OR MODE_ASCEND_ACL)
|
||||||
# common env paths
|
# common env paths
|
||||||
if(DEFINED ENV{D_LINK_PATH})
|
if(DEFINED ENV{D_LINK_PATH})
|
||||||
|
@ -495,17 +501,13 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
target_link_libraries(_c_expression PRIVATE -Wl,--whole-archive mindspore -Wl,--no-whole-archive mindspore_core
|
target_link_libraries(_c_expression PRIVATE -Wl,--whole-archive mindspore -Wl,--no-whole-archive mindspore_core
|
||||||
mindspore_common mindspore_backend)
|
mindspore_common mindspore_backend)
|
||||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
target_link_libraries(mindspore PUBLIC proto_input mindspore::protobuf
|
target_link_libraries(mindspore PUBLIC proto_input mindspore::protobuf mindspore::eigen mindspore::json)
|
||||||
mindspore::event mindspore::event_pthreads mindspore::event_openssl mindspore::eigen mindspore::json)
|
|
||||||
target_link_libraries(mindspore PUBLIC mindspore::event_core ps_cache)
|
|
||||||
target_link_libraries(_c_expression PRIVATE -Wl,-all_load mindspore proto_input -Wl,-noall_load mindspore_core
|
target_link_libraries(_c_expression PRIVATE -Wl,-all_load mindspore proto_input -Wl,-noall_load mindspore_core
|
||||||
mindspore_common mindspore_backend)
|
mindspore_common mindspore_backend)
|
||||||
target_link_libraries(_c_expression PRIVATE mindspore::pybind11_module)
|
target_link_libraries(_c_expression PRIVATE mindspore::pybind11_module)
|
||||||
else()
|
else()
|
||||||
if(ENABLE_CPU AND NOT WIN32)
|
if(ENABLE_CPU AND NOT WIN32)
|
||||||
target_link_libraries(mindspore PUBLIC proto_input mindspore::protobuf
|
target_link_libraries(mindspore PUBLIC proto_input mindspore::protobuf mindspore::eigen mindspore::json)
|
||||||
mindspore::event mindspore::event_pthreads mindspore::event_openssl mindspore::eigen mindspore::json)
|
|
||||||
target_link_libraries(mindspore PUBLIC -Wl,--no-as-needed mindspore::event_core ps_cache)
|
|
||||||
if(${ENABLE_IBVERBS} STREQUAL "ON")
|
if(${ENABLE_IBVERBS} STREQUAL "ON")
|
||||||
target_link_libraries(mindspore PUBLIC ibverbs rdmacm)
|
target_link_libraries(mindspore PUBLIC ibverbs rdmacm)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -309,4 +309,5 @@ add_library(backend_static STATIC
|
||||||
$<TARGET_OBJECTS:_mindspore_runtime_pynative_obj>
|
$<TARGET_OBJECTS:_mindspore_runtime_pynative_obj>
|
||||||
$<TARGET_OBJECTS:_mindspore_runtime_recovery_obj>)
|
$<TARGET_OBJECTS:_mindspore_runtime_recovery_obj>)
|
||||||
target_link_libraries(ut_tests PRIVATE mindspore securec -Wl,--start-group proto_input mindspore::protobuf
|
target_link_libraries(ut_tests PRIVATE mindspore securec -Wl,--start-group proto_input mindspore::protobuf
|
||||||
backend_static -Wl,--end-group)
|
backend_static -Wl,--end-group)
|
||||||
|
target_link_libraries(ut_tests PRIVATE mindspore::grpc++)
|
Loading…
Reference in New Issue