diff --git a/cmake/external_libs/nccl.cmake b/cmake/external_libs/nccl.cmake index c9c43f38f91..2f1b1b7230d 100644 --- a/cmake/external_libs/nccl.cmake +++ b/cmake/external_libs/nccl.cmake @@ -6,9 +6,10 @@ else() set(MD5 "073b19899f374c5ba07d2db02dc38f9f") endif() +find_package(CUDA REQUIRED) set(nccl_CFLAGS "-D_FORTIFY_SOURCE=2 -O2") mindspore_add_pkg(nccl - VER 2.7.6-1 + VER 2.7.6-1-${CUDA_VERSION} LIBS nccl URL ${REQ_URL} MD5 ${MD5}