summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2021-02-26 18:38:20 -0500
committerGitHub <noreply@github.com>2021-02-26 15:38:20 -0800
commitf2f58b70b1153621d9b42fa2f9045d81843692a7 (patch)
treeeed7f3752671650c563793ba0f143ed2ae94f818
parentf957f1936c4f649e34a3b6340b5ab9d3023fbc2d (diff)
downloadspack-f2f58b70b1153621d9b42fa2f9045d81843692a7.tar.gz
spack-f2f58b70b1153621d9b42fa2f9045d81843692a7.tar.bz2
spack-f2f58b70b1153621d9b42fa2f9045d81843692a7.tar.xz
spack-f2f58b70b1153621d9b42fa2f9045d81843692a7.zip
nccl-tests: respect cuda_arch variant during build (#21995)
-rw-r--r--var/spack/repos/builtin/packages/nccl-tests/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/nccl-tests/package.py b/var/spack/repos/builtin/packages/nccl-tests/package.py
index 2b2f1b8fab..9e1a202da2 100644
--- a/var/spack/repos/builtin/packages/nccl-tests/package.py
+++ b/var/spack/repos/builtin/packages/nccl-tests/package.py
@@ -31,6 +31,11 @@ class NcclTests(MakefilePackage, CudaPackage):
targets.append('MPI=1')
return targets
+ def setup_build_environment(self, env):
+ cuda_arch = self.spec.variants["cuda_arch"].value
+ cuda_gencode = " ".join(self.cuda_flags(cuda_arch))
+ env.set("NVCC_GENCODE", cuda_gencode)
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install_tree('./build', prefix.bin)