Revert D14717015: [pytorch][PR] fix nccl compilation to make sure it compiles for...
authorSoumith Chintala <soumith@fb.com>
Tue, 2 Apr 2019 16:36:05 +0000 (09:36 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 2 Apr 2019 16:39:03 +0000 (09:39 -0700)
Differential Revision:
D14717015

Original commit changeset: 4aac036f57e5

fbshipit-source-id: c820b8dfb27564271e6b80e133fe655658a7c25c

cmake/External/nccl.cmake

index 56fdbd5..47c6027 100644 (file)
@@ -20,8 +20,8 @@ if (NOT __NCCL_INCLUDED)
       endif()
     endif()
   else()
-    torch_cuda_get_nvcc_gencode_flag(NVCC_GENCODE)
     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}")