@@ -125,6 +125,19 @@ def print_warning(*args, **kwargs):
125125 orig_print_warning (* args , ** kwargs )
126126
127127
128+ def get_cuda_cc_string (self ):
129+ # required keyword was introduce in 5.1.1
130+ if EASYBUILD_VERSION >= '5.1.1' :
131+ cuda_ccs_string = self .cfg .get_cuda_cc_template_value ('cuda_compute_capabilities' , required = False )
132+ # mimic the 'required=False' behavior pre-EB 5.1.1
133+ else :
134+ try :
135+ cuda_ccs_string = self .cfg .get_cuda_cc_template_value ('cuda_compute_capabilities' )
136+ except :
137+ cuda_ccs_string = ''
138+ return cuda_ccs_string
139+
140+
128141def is_gcccore_1220_based (** kwargs ):
129142# ecname, ecversion, tcname, tcversion):
130143 """
@@ -760,7 +773,7 @@ def is_unsupported_module(self):
760773 cudnn_ver = get_dependency_software_version ("cuDNN" , ec = self .cfg , check_deps = True , check_builddeps = True )
761774 if cudnn_ver :
762775 # cuda_ccs_string is e.g. "8.0,9.0"
763- cuda_ccs_string = self . cfg . get_cuda_cc_template_value ( 'cuda_compute_capabilities' , required = False )
776+ cuda_ccs_string = get_cuda_cc_string ( self )
764777 # cuda_ccs is empty if none are defined
765778 if cuda_ccs_string :
766779 # cuda_ccs is a comma-seperated string. Convert to list for easier handling
@@ -788,7 +801,7 @@ def is_unsupported_module(self):
788801 cudaver = get_dependency_software_version ("CUDA" , ec = self .cfg , check_deps = True , check_builddeps = True )
789802 if cudaver :
790803 # cuda_ccs_string is e.g. "8.0,9.0"
791- cuda_ccs_string = self . cfg . get_cuda_cc_template_value ( 'cuda_compute_capabilities' , required = False )
804+ cuda_ccs_string = get_cuda_cc_string ( self )
792805 # cuda_ccs is empty if none are defined
793806 if cuda_ccs_string :
794807 # cuda_ccs is a comma-seperated string. Convert to list for easier handling
0 commit comments