Pack nccl lib to MS whl

This commit is contained in:
ZPaC 2022-01-28 17:24:43 +08:00
parent 4aa3173d9a
commit e3ccb94b03
3 changed files with 7 additions and 2 deletions

View File

@ -12,8 +12,8 @@ mindspore_add_pkg(nccl
LIBS nccl
URL ${REQ_URL}
MD5 ${MD5}
BUILD_OPTION src.build NVCC_GENCODE="-gencode=arch=compute_70,code=sm_70"
BUILD_OPTION src.build
INSTALL_INCS build/include/*
INSTALL_LIBS build/lib/*)
include_directories(${nccl_INC})
add_library(mindspore::nccl ALIAS nccl::nccl)
add_library(mindspore::nccl ALIAS nccl::nccl)

View File

@ -202,6 +202,10 @@ if(ENABLE_GPU)
DESTINATION ${INSTALL_LIB_DIR}
COMPONENT mindspore
)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
install(FILES ${nccl_LIBPATH}/libnccl.so.2.7.6 DESTINATION ${INSTALL_LIB_DIR}
RENAME libnccl.so.2 COMPONENT mindspore)
endif()
endif()
install(
TARGETS gpu_queue

View File

@ -422,6 +422,7 @@ if(ENABLE_GPU)
endif()
if(ENABLE_MPI)
set_target_properties(_ms_mpi PROPERTIES INSTALL_RPATH ${MINDSPORE_RPATH})
set_target_properties(nvidia_collective PROPERTIES INSTALL_RPATH ${ORIGIN_PATH})
endif()
endif()