2021-01-23 20:20:31 +08:00
|
|
|
if(ENABLE_GITEE)
|
2020-10-26 15:24:47 +08:00
|
|
|
set(REQ_URL "https://gitee.com/mirrors/nccl/repository/archive/v2.7.6-1.tar.gz")
|
2021-11-17 10:06:28 +08:00
|
|
|
set(MD5 "6884364c2b1cf229f0bdaf94efcb5782")
|
2020-10-20 17:21:04 +08:00
|
|
|
else()
|
2020-10-26 15:24:47 +08:00
|
|
|
set(REQ_URL "https://github.com/NVIDIA/nccl/archive/v2.7.6-1.tar.gz")
|
|
|
|
set(MD5 "073b19899f374c5ba07d2db02dc38f9f")
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-03-27 14:49:12 +08:00
|
|
|
|
2022-04-28 15:10:26 +08:00
|
|
|
find_package(CUDA REQUIRED)
|
2020-03-27 14:49:12 +08:00
|
|
|
set(nccl_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
|
|
|
|
mindspore_add_pkg(nccl
|
2022-04-28 15:10:26 +08:00
|
|
|
VER 2.7.6-1-${CUDA_VERSION}
|
2020-03-27 14:49:12 +08:00
|
|
|
LIBS nccl
|
2020-10-20 17:21:04 +08:00
|
|
|
URL ${REQ_URL}
|
|
|
|
MD5 ${MD5}
|
2022-01-28 17:24:43 +08:00
|
|
|
BUILD_OPTION src.build
|
2020-03-27 14:49:12 +08:00
|
|
|
INSTALL_INCS build/include/*
|
|
|
|
INSTALL_LIBS build/lib/*)
|
|
|
|
include_directories(${nccl_INC})
|
2022-01-28 17:24:43 +08:00
|
|
|
add_library(mindspore::nccl ALIAS nccl::nccl)
|