Skip to content

Commit 595b610

Browse files
committed
add support for nvidia-compilers and NVHPC as GPU modules
1 parent 3d441a5 commit 595b610

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/build_tools/hooks_hydra.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,10 @@ def parse_hook(ec, *args, **kwargs): # pylint: disable=unused-argument
312312

313313
# skip installation of CUDA software in non-GPU architectures, only create module file
314314
is_cuda_software = 'CUDA' in ec.name or 'CUDA' in ec['versionsuffix']
315+
cuda_tcs = ['CUDA', 'nvidia-compilers', 'NVHPC']
316+
is_cuda_software = ec.name in cuda_tcs or ec.toolchain.name in cuda_tcs or 'CUDA' in ec['versionsuffix']
315317
if is_cuda_software and LOCAL_ARCH_FULL not in GPU_ARCHS:
318+
# only install the module file in non-GPU nodes
316319
# module_only steps: [MODULE_STEP, PREPARE_STEP, READY_STEP, POSTITER_STEP, SANITYCHECK_STEP]
317320
ec['module_only'] = True
318321
ec.log.info(f"[parse hook] Set parameter module_only: {ec['module_only']}")
@@ -321,6 +324,7 @@ def parse_hook(ec, *args, **kwargs): # pylint: disable=unused-argument
321324

322325
# set cuda compute capabilities
323326
elif is_cuda_software:
327+
# on GPU nodes set cuda compute capabilities
324328
ec['cuda_compute_capabilities'] = ARCHS[LOCAL_ARCH_FULL]['cuda_cc']
325329
ec.log.info(f"[parse hook] Set parameter cuda_compute_capabilities: {ec['cuda_compute_capabilities']}")
326330

0 commit comments

Comments
 (0)