From db46d0015b343f0feb864f843682240124a4b73e Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Wed, 8 Jul 2026 12:56:37 +0200 Subject: [PATCH 1/3] Don't fail hooks if CUDA-Sample version is not recognised --- eb_hooks.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 4c41227d..3523a817 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1130,21 +1130,23 @@ def pre_configure_hook_BLIS(self, *args, **kwargs): def pre_configure_hook_CUDA_Samples_test_remove(self, *args, **kwargs): """skip immaTensorCoreGemm in CUDA-Samples for compute capability 7.0.""" - if self.name == 'CUDA-Samples' and self.version in ['12.1']: - # Get compute capability from build option - cuda_caps = build_option('cuda_compute_capabilities') - # Check if compute capability 7.0 is in the list - if cuda_caps and '7.0' in cuda_caps: - print_msg("Applying hook for CUDA-Samples %s with compute capability 7.0", self.version) - # local_filters is set by the easyblock, remove path to the Makefile instead - makefile_path = os.path.join(self.start_dir, 'Samples/3_CUDA_Features/immaTensorCoreGemm/Makefile') - if os.path.exists(makefile_path): - remove_file(makefile_path) - print_msg("Removed Makefile at %s to skip immaTensorCoreGemm build", makefile_path) - else: - print_msg("Makefile not found at %s", makefile_path) - else: - raise EasyBuildError("CUDA-Samples-specific hook triggered for non-CUDA-Samples easyconfig?!") + if self.name == 'CUDA-Samples': + if self.version in ['12.1']: + # Get compute capability from build option + cuda_caps = build_option('cuda_compute_capabilities') + # Check if compute capability 7.0 is in the list + if cuda_caps and '7.0' in cuda_caps: + print_msg("Applying hook for CUDA-Samples %s with compute capability 7.0", self.version) + # local_filters is set by the easyblock, remove path to the Makefile instead + makefile_path = os.path.join(self.start_dir, 'Samples/3_CUDA_Features/immaTensorCoreGemm/Makefile') + if os.path.exists(makefile_path): + remove_file(makefile_path) + print_msg("Removed Makefile at %s to skip immaTensorCoreGemm build", makefile_path) + else: + print_msg("Makefile not found at %s", makefile_path) + else: + print_warning(f"CUDA-Samples hook triggered but version {self.version} does not have a code path.") + def pre_configure_hook_grass(self, *args, **kwargs): From 625e57491644aa4c53956bb2eb583e4a8205edfe Mon Sep 17 00:00:00 2001 From: ocaisa Date: Wed, 8 Jul 2026 17:53:36 +0200 Subject: [PATCH 2/3] Update eb_hooks.py --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index f6e390e4..90d274c7 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1156,7 +1156,7 @@ def pre_configure_hook_CUDA_Samples_test_remove(self, *args, **kwargs): else: print_msg("Makefile not found at %s", makefile_path) else: - print_warning(f"CUDA-Samples hook triggered but version {self.version} does not have a code path.") + print_msg(f"CUDA-Samples hook triggered but no hook needed for version {self.version}") From a05676db065cbd314ae146e942b55a8d2b415fd4 Mon Sep 17 00:00:00 2001 From: ocaisa Date: Wed, 8 Jul 2026 17:54:16 +0200 Subject: [PATCH 3/3] Update eb_hooks.py --- eb_hooks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 90d274c7..4a9f1499 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1159,7 +1159,6 @@ def pre_configure_hook_CUDA_Samples_test_remove(self, *args, **kwargs): print_msg(f"CUDA-Samples hook triggered but no hook needed for version {self.version}") - def pre_configure_hook_grass(self, *args, **kwargs): """ Pre-configure hook for GRASS to remove filtered deps specific configopts lines for readline, zlib, and bzlib