@@ -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+
537556def 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
11931212PRE_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