enable the variant AMDGPU_TARGETS in rocsolver (#25423)
This commit is contained in:
parent
5f50f3329f
commit
2d047d1f51
@ -16,6 +16,11 @@ class Rocsolver(CMakePackage):
|
|||||||
|
|
||||||
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
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,
|
variant('optimal', default=True,
|
||||||
description='This option improves performance at the cost of increased binary \
|
description='This option improves performance at the cost of increased binary \
|
||||||
size and compile time by adding specialized kernels \
|
size and compile time by adding specialized kernels \
|
||||||
@ -46,6 +51,7 @@ class Rocsolver(CMakePackage):
|
|||||||
depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
|
depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
|
tgt = self.spec.variants['amdgpu_target'].value
|
||||||
args = [
|
args = [
|
||||||
self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
|
self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
|
||||||
self.define('BUILD_CLIENTS_TESTS', 'OFF'),
|
self.define('BUILD_CLIENTS_TESTS', 'OFF'),
|
||||||
@ -61,6 +67,13 @@ def cmake_args(self):
|
|||||||
if self.spec.satisfies('@3.7.0:'):
|
if self.spec.satisfies('@3.7.0:'):
|
||||||
args.append(self.define_from_variant('OPTIMAL', 'optimal'))
|
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:'):
|
if self.spec.satisfies('^cmake@3.21:'):
|
||||||
args.append(self.define('__skip_rocmclang', 'ON'))
|
args.append(self.define('__skip_rocmclang', 'ON'))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user