RAJA + Umpire: CUDA Arch fixes (#24531)
This commit is contained in:
parent
3e65828a7e
commit
a6ce000e09
2 changed files with 12 additions and 3 deletions
|
@ -40,15 +40,18 @@ class Raja(CMakePackage, CudaPackage, ROCmPackage):
|
||||||
depends_on('blt@0.4.0:', type='build', when='@0.13.1:')
|
depends_on('blt@0.4.0:', type='build', when='@0.13.1:')
|
||||||
depends_on('blt@:0.3.6', type='build', when='@:0.13.0')
|
depends_on('blt@:0.3.6', type='build', when='@:0.13.0')
|
||||||
|
|
||||||
depends_on('camp')
|
|
||||||
depends_on('camp+cuda', when='+cuda')
|
|
||||||
|
|
||||||
# variants +rocm and amdgpu_targets are not automatically passed to
|
# variants +rocm and amdgpu_targets are not automatically passed to
|
||||||
# dependencies, so do it manually.
|
# dependencies, so do it manually.
|
||||||
depends_on('camp+rocm', when='+rocm')
|
depends_on('camp+rocm', when='+rocm')
|
||||||
for val in ROCmPackage.amdgpu_targets:
|
for val in ROCmPackage.amdgpu_targets:
|
||||||
depends_on('camp amdgpu_target=%s' % val, when='amdgpu_target=%s' % val)
|
depends_on('camp amdgpu_target=%s' % val, when='amdgpu_target=%s' % val)
|
||||||
|
|
||||||
|
depends_on('camp')
|
||||||
|
depends_on('camp+cuda', when='+cuda')
|
||||||
|
for sm_ in CudaPackage.cuda_arch_values:
|
||||||
|
depends_on('camp cuda_arch={0}'.format(sm_),
|
||||||
|
when='cuda_arch={0}'.format(sm_))
|
||||||
|
|
||||||
conflicts('+openmp', when='+rocm')
|
conflicts('+openmp', when='+rocm')
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
|
@ -68,6 +71,7 @@ def cmake_args(self):
|
||||||
if not spec.satisfies('cuda_arch=none'):
|
if not spec.satisfies('cuda_arch=none'):
|
||||||
cuda_arch = spec.variants['cuda_arch'].value
|
cuda_arch = spec.variants['cuda_arch'].value
|
||||||
options.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch[0]))
|
options.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch[0]))
|
||||||
|
options.append('-DCMAKE_CUDA_ARCHITECTURES={0}'.format(cuda_arch[0]))
|
||||||
else:
|
else:
|
||||||
options.append('-DENABLE_CUDA=OFF')
|
options.append('-DENABLE_CUDA=OFF')
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,10 @@ class Umpire(CMakePackage, CudaPackage, ROCmPackage):
|
||||||
depends_on('camp amdgpu_target=%s' % val, when='amdgpu_target=%s' % val)
|
depends_on('camp amdgpu_target=%s' % val, when='amdgpu_target=%s' % val)
|
||||||
|
|
||||||
depends_on('camp')
|
depends_on('camp')
|
||||||
|
depends_on('camp+cuda', when='+cuda')
|
||||||
|
for sm_ in CudaPackage.cuda_arch_values:
|
||||||
|
depends_on('camp cuda_arch={0}'.format(sm_),
|
||||||
|
when='cuda_arch={0}'.format(sm_))
|
||||||
|
|
||||||
conflicts('+numa', when='@:0.3.2')
|
conflicts('+numa', when='@:0.3.2')
|
||||||
conflicts('~c', when='+fortran', msg='Fortran API requires C API')
|
conflicts('~c', when='+fortran', msg='Fortran API requires C API')
|
||||||
|
@ -97,6 +101,7 @@ def cmake_args(self):
|
||||||
if not spec.satisfies('cuda_arch=none'):
|
if not spec.satisfies('cuda_arch=none'):
|
||||||
cuda_arch = spec.variants['cuda_arch'].value
|
cuda_arch = spec.variants['cuda_arch'].value
|
||||||
options.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch[0]))
|
options.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch[0]))
|
||||||
|
options.append('-DCMAKE_CUDA_ARCHITECTURES={0}'.format(cuda_arch[0]))
|
||||||
flag = '-arch sm_{0}'.format(cuda_arch[0])
|
flag = '-arch sm_{0}'.format(cuda_arch[0])
|
||||||
options.append('-DCMAKE_CUDA_FLAGS:STRING={0}'.format(flag))
|
options.append('-DCMAKE_CUDA_FLAGS:STRING={0}'.format(flag))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue