Skip to content

Commit da115a4

Browse files
authored
Merge pull request #1083 from TopRichard/eessi-2023.06-CUDA-Samples-12.1-cc70
Build CUDA-Samples-12.1 for supported combinations of CPU and CUDA compute capability 70
2 parents 028d2ae + 8f3c96d commit da115a4

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

easystacks/software.eessi.io/2023.06/accel/nvidia/eessi-2023.06-eb-4.9.4-cc70-CUDA.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ easyconfigs:
66
accept-eula-for: CUDA
77
# see https://github.com/easybuilders/easybuild-easyblocks/pull/3516
88
include-easyblocks-from-commit: 3469151ce7e4f85415c877dee555aeea7691c757
9-
# - CUDA-Samples-12.1-GCC-12.3.0-CUDA-12.1.1.eb
9+
- CUDA-Samples-12.1-GCC-12.3.0-CUDA-12.1.1.eb
1010
- UCX-CUDA-1.14.1-GCCcore-12.3.0-CUDA-12.1.1.eb
1111
- UCC-CUDA-1.2.0-GCCcore-12.3.0-CUDA-12.1.1.eb
1212
- OSU-Micro-Benchmarks-7.2-gompi-2023a-CUDA-12.1.1.eb

eb_hooks.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,25 @@ def pre_configure_hook_BLIS_a64fx(self, *args, **kwargs):
534534
raise EasyBuildError("BLIS-specific hook triggered for non-BLIS easyconfig?!")
535535

536536

537+
def pre_configure_hook_CUDA_Samples_test_remove(self, *args, **kwargs):
538+
"""skip immaTensorCoreGemm in CUDA-Samples for compute capability 7.0."""
539+
if self.name == 'CUDA-Samples' and self.version in ['12.1']:
540+
# Get compute capability from build option
541+
cuda_caps = build_option('cuda_compute_capabilities')
542+
# Check if compute capability 7.0 is in the list
543+
if cuda_caps and '7.0' in cuda_caps:
544+
print_msg("Applying hook for CUDA-Samples %s with compute capability 7.0", self.version)
545+
# local_filters is set by the easyblock, remove path to the Makefile instead
546+
makefile_path = os.path.join(self.start_dir, 'Samples/3_CUDA_Features/immaTensorCoreGemm/Makefile')
547+
if os.path.exists(makefile_path):
548+
remove_file(makefile_path)
549+
print_msg("Removed Makefile at %s to skip immaTensorCoreGemm build", makefile_path)
550+
else:
551+
print_msg("Makefile not found at %s", makefile_path)
552+
else:
553+
raise EasyBuildError("CUDA-Samples-specific hook triggered for non-CUDA-Samples easyconfig?!")
554+
555+
537556
def pre_configure_hook_score_p(self, *args, **kwargs):
538557
"""
539558
Pre-configure hook for Score-p
@@ -1192,6 +1211,7 @@ def post_module_hook(self, *args, **kwargs):
11921211

11931212
PRE_CONFIGURE_HOOKS = {
11941213
'BLIS': pre_configure_hook_BLIS_a64fx,
1214+
'CUDA-Samples': pre_configure_hook_CUDA_Samples_test_remove,
11951215
'GObject-Introspection': pre_configure_hook_gobject_introspection,
11961216
'Extrae': pre_configure_hook_extrae,
11971217
'GROMACS': pre_configure_hook_gromacs,

0 commit comments

Comments
 (0)