mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
don't expand cmake variable in IF
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/13331 Differential Revision: D12849306 Pulled By: anderspapitto fbshipit-source-id: 2f1f72a44ed3a176be8c7490652e49771c3fadbf
This commit is contained in:
parent
cc3618ce36
commit
c68b82ebc8
1 changed files with 3 additions and 1 deletions
4
cmake/External/nccl.cmake
vendored
4
cmake/External/nccl.cmake
vendored
|
|
@ -8,9 +8,11 @@ if (NOT __NCCL_INCLUDED)
|
|||
target_link_libraries(__caffe2_nccl INTERFACE ${NCCL_LIBRARIES})
|
||||
target_include_directories(__caffe2_nccl INTERFACE ${NCCL_INCLUDE_DIRS})
|
||||
else()
|
||||
if (${TORCH_CUDA_ARCH_LIST})
|
||||
if (TORCH_CUDA_ARCH_LIST)
|
||||
torch_cuda_get_nvcc_gencode_flag(NVCC_GENCODE)
|
||||
string(REPLACE "-gencode;" "-gencode=" NVCC_GENCODE "${NVCC_GENCODE}")
|
||||
# this second replacement is needed when there are multiple archs
|
||||
string(REPLACE ";-gencode" " -gencode" NVCC_GENCODE "${NVCC_GENCODE}")
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(nccl_external
|
||||
|
|
|
|||
Loading…
Reference in a new issue