Make CUDA and ROCm architecture conditional (#27185)
* Make CUDA and ROCm architecture conditional fixes #14337 The variant to specify which architecture to use for CUDA and ROCm are now conditional on +cuda and +rocm respectively. * cp2k: make all CUDA related variants conditional on +cuda
This commit is contained in:

committed by
GitHub

parent
5f10562ad1
commit
5eba5dc271
@@ -35,7 +35,8 @@ class CudaPackage(PackageBase):
|
||||
|
||||
variant('cuda_arch',
|
||||
description='CUDA architecture',
|
||||
values=spack.variant.any_combination_of(*cuda_arch_values))
|
||||
values=spack.variant.any_combination_of(*cuda_arch_values),
|
||||
when='+cuda')
|
||||
|
||||
# https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-examples
|
||||
# https://llvm.org/docs/CompileCudaWithLLVM.html#compiling-cuda-code
|
||||
|
@@ -100,7 +100,8 @@ class ROCmPackage(PackageBase):
|
||||
# possible amd gpu targets for rocm builds
|
||||
variant('amdgpu_target',
|
||||
description='AMD GPU architecture',
|
||||
values=spack.variant.any_combination_of(*amdgpu_targets))
|
||||
values=spack.variant.any_combination_of(*amdgpu_targets),
|
||||
when='+rocm')
|
||||
|
||||
depends_on('llvm-amdgpu', when='+rocm')
|
||||
depends_on('hsa-rocr-dev', when='+rocm')
|
||||
|
Reference in New Issue
Block a user