Skip to content

Commit c4ed80c

Browse files
authored
Merge pull request #209 from bedroge/cuda_12.8.0_100f
also change 10.0f to 10.0 for CUDA 12.8.0
2 parents 5a06ee3 + 1ac15e6 commit c4ed80c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

eb_hooks.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -915,15 +915,15 @@ def post_easyblock_hook_copy_easybuild_subdir(self, *args, **kwargs):
915915

916916
def pre_prepare_hook_cuda_dependant(self, *args, **kwargs):
917917
"""
918-
CUDA 12.8.0 doesn't support the 12.0f target, only 12.0. This hook converts any CC 12.0f into 12.0
919-
if the current package depends on CUDA.
918+
CUDA 12.8.0 doesn't support the 10.0f and 12.0f targets, only 10.0 and 12.0. This hook converts
919+
any CC 10.0f / 12.0f into 10.0 / 12.0 if the current package depends on CUDA.
920920
"""
921921

922922
cudaver = get_dependency_software_version("CUDA", ec=self.cfg, check_deps=True, check_builddeps=True)
923-
if cudaver:
923+
if cudaver and cudaver == '12.8.0':
924924
cuda_cc = build_option('cuda_compute_capabilities')
925-
if cuda_cc and '12.0f' in cuda_cc:
926-
updated_cuda_cc = [v.replace('12.0f', '12.0') for v in cuda_cc]
925+
if cuda_cc and ('10.0f' in cuda_cc or '12.0f' in cuda_cc):
926+
updated_cuda_cc = [v.replace('.0f', '.0') if v in ['10.0f', '12.0f'] else v for v in cuda_cc]
927927
update_build_option('cuda_compute_capabilities', updated_cuda_cc)
928928

929929

0 commit comments

Comments
 (0)