Skip to content

Fix use of CUDA CCs in LLVM easyblock and cleanup #3755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
7 changes: 6 additions & 1 deletion easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ def extra_options(extra_vars=None):
})
return extra_vars

@staticmethod
def list_to_cmake_arg(lst):
"""Convert iterable of strings to a value that can be passed as a CLI argument to CMake resulting in a list"""
return "'%s'" % ';'.join(lst)

def __init__(self, *args, **kwargs):
"""Constructor for CMakeMake easyblock"""
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -356,7 +361,7 @@ def configure_step(self, srcdir=None, builddir=None):
options['CMAKE_CUDA_COMPILER'] = which('nvcc')
cuda_cc = build_option('cuda_compute_capabilities') or self.cfg['cuda_compute_capabilities']
if cuda_cc:
options['CMAKE_CUDA_ARCHITECTURES'] = '"%s"' % ';'.join([cc.replace('.', '') for cc in cuda_cc])
options['CMAKE_CUDA_ARCHITECTURES'] = self.list_to_cmake_arg(cc.replace('.', '') for cc in cuda_cc)
else:
raise EasyBuildError('List of CUDA compute capabilities must be specified, either via '
'cuda_compute_capabilities easyconfig parameter or via '
Expand Down
Loading