diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/camp/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/camp/package.py | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/var/spack/repos/builtin/packages/camp/package.py b/var/spack/repos/builtin/packages/camp/package.py index 67285e9742..0d0f26280c 100644 --- a/var/spack/repos/builtin/packages/camp/package.py +++ b/var/spack/repos/builtin/packages/camp/package.py @@ -6,7 +6,7 @@ from spack import * -class Camp(CMakePackage, CudaPackage): +class Camp(CMakePackage, CudaPackage, HipPackage): """ Compiler agnostic metaprogramming library providing concepts, type operations and tuples for C++ and cuda @@ -22,27 +22,6 @@ class Camp(CMakePackage, CudaPackage): depends_on('cmake@3.8:', type='build') depends_on('cmake@3.9:', type='build', when="+cuda") - variant('hip', default=False, description='Enable HIP support') - - # possible amd gpu targets for hip builds - # TODO: we should add a hip build system description equivalent to - # lib/spack/spack/build_systems/cuda.py, where possible hip amd gpu - # architectures are defined in a similar way as for cuda gpu - # architectures. In the meantime, require users to define - # amd gpu type for hip builds with a variant here. - amdgpu_targets = ( - 'gfx701', 'gfx801', 'gfx802', 'gfx803', - 'gfx900', 'gfx906', 'gfx908', 'gfx1010', - 'gfx1011', 'gfx1012', 'none' - ) - variant('amdgpu_target', default='none', values=amdgpu_targets) - - depends_on('llvm-amdgpu', when='+hip') - depends_on('hip', when='+hip') - - # need amd gpu type for hip builds - conflicts('amdgpu_target=none', when='+hip') - def cmake_args(self): spec = self.spec @@ -66,7 +45,7 @@ class Camp(CMakePackage, CudaPackage): options.extend([ '-DENABLE_HIP=ON', '-DHIP_ROOT_DIR={0}'.format(spec['hip'].prefix), - '-DHIP_HCC_FLAGS=--amdgpu-target={0}'.format(arch)]) + '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}'.format(arch)]) else: options.append('-DENABLE_HIP=OFF') |