diff options
author | Sreenivasa Murthy Kolam <67086238+srekolam@users.noreply.github.com> | 2021-08-16 04:06:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-16 13:06:09 +0200 |
commit | 2d047d1f51de2bd61ab787ac17d3a096205b3ee6 (patch) | |
tree | 23272968c0af855b1666a8bdcd6b8873b7b6e1ef /var | |
parent | 5f50f3329f964208b7dc7b21d1d6c10b3eca2e3f (diff) | |
download | spack-2d047d1f51de2bd61ab787ac17d3a096205b3ee6.tar.gz spack-2d047d1f51de2bd61ab787ac17d3a096205b3ee6.tar.bz2 spack-2d047d1f51de2bd61ab787ac17d3a096205b3ee6.tar.xz spack-2d047d1f51de2bd61ab787ac17d3a096205b3ee6.zip |
enable the variant AMDGPU_TARGETS in rocsolver (#25423)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/rocsolver/package.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py index b45176d6af..fd179ffb42 100644 --- a/var/spack/repos/builtin/packages/rocsolver/package.py +++ b/var/spack/repos/builtin/packages/rocsolver/package.py @@ -16,6 +16,11 @@ class Rocsolver(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie'] + amdgpu_targets = ( + 'none', 'gfx803', 'gfx900', 'gfx906:xnack-', 'gfx908:xnack-', + 'gfx90a:xnack-', 'gfx90a:xnack+', 'gfx1010', 'gfx1011', 'gfx1012', 'gfx1030' + ) + variant('amdgpu_target', default='gfx906:xnack-', multi=True, values=amdgpu_targets) variant('optimal', default=True, description='This option improves performance at the cost of increased binary \ size and compile time by adding specialized kernels \ @@ -46,6 +51,7 @@ class Rocsolver(CMakePackage): depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) def cmake_args(self): + tgt = self.spec.variants['amdgpu_target'].value args = [ self.define('BUILD_CLIENTS_SAMPLES', 'OFF'), self.define('BUILD_CLIENTS_TESTS', 'OFF'), @@ -61,6 +67,13 @@ class Rocsolver(CMakePackage): if self.spec.satisfies('@3.7.0:'): args.append(self.define_from_variant('OPTIMAL', 'optimal')) + if tgt[0] != 'none': + if '@:3.8.0' in self.spec: + args.append(self.define('CMAKE_CXX_FLAGS', + '--amdgpu-target={0}'.format(",".join(tgt)))) + else: + args.append(self.define('AMDGPU_TARGETS', ";".join(tgt))) + if self.spec.satisfies('^cmake@3.21:'): args.append(self.define('__skip_rocmclang', 'ON')) |