yaksa: Add support for cuda_arch variants (#30471)

This commit is contained in:
Ken Raffenetti 2022-05-05 10:12:21 -05:00 committed by GitHub
parent dcd2f8a4ed
commit e88396e5ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,12 @@ def autoreconf(self, spec, prefix):
def configure_args(self): def configure_args(self):
spec = self.spec spec = self.spec
config_args = [] config_args = []
config_args += self.with_or_without('cuda', activation_value='prefix') config_args += self.with_or_without('cuda', activation_value='prefix')
if '+cuda' in spec:
cuda_archs = spec.variants['cuda_arch'].value
if 'none' not in cuda_archs:
config_args.append('--with-cuda-sm={0}'.format(",".join(cuda_archs)))
if '+rocm' in spec: if '+rocm' in spec:
config_args.append('--with-hip={0}'.format(spec['hip'].prefix)) config_args.append('--with-hip={0}'.format(spec['hip'].prefix))