rocblas: use AMDGPU_TARGETS instead of Tensile_ARCHITECTURE (#25778)

This commit is contained in:
Harmen Stoppels 2021-09-03 18:19:57 +02:00 committed by GitHub
parent 64407e253c
commit c6c9213766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,9 @@ def setup_build_environment(self, env):
def cmake_args(self):
arch = self.spec.variants['tensile_architecture'].value
if self.spec.satisfies('@4.1.0:'):
if arch == 'gfx906' or arch == 'gfx908':
arch = arch + ':xnack-'
tensile = join_path(self.stage.source_path, 'Tensile')
@ -104,10 +107,11 @@ def cmake_args(self):
if '@3.7.0:' in self.spec:
args.append(self.define('Tensile_LIBRARY_FORMAT', 'msgpack'))
if self.spec.satisfies('@4.1.0:'):
if arch == 'gfx906' or arch == 'gfx908':
arch = arch + ':xnack-'
args.append(self.define('Tensile_ARCHITECTURE', arch))
# See https://github.com/ROCmSoftwarePlatform/rocBLAS/commit/c1895ba4bb3f4f5947f3818ebd155cf71a27b634
if self.spec.satisfies('@:4.2.0'):
args.append(self.define('Tensile_ARCHITECTURE', arch))
else:
args.append(self.define('AMDGPU_TARGETS', arch))
# See https://github.com/ROCmSoftwarePlatform/rocBLAS/issues/1196
if self.spec.satisfies('^cmake@3.21:'):