@@ -143,7 +143,7 @@ def _get_active_cuda(self):
143143 f"{ self .name } -{ self .version } : { supported_cuda_commasep } "
144144 )
145145 self .log .info (
146- f"Using version '{ nvcomp_cuda_version } ' of loaded nvidia-compilers dependency "
146+ f"Using CUDA version '{ nvcomp_cuda_version } ' from nvidia-compilers dependency "
147147 f"as 'default_cuda_version' of { self .name } "
148148 )
149149 return nvcomp_cuda_version
@@ -197,7 +197,6 @@ def _get_default_compute_capability(self):
197197 2. CC set by option 'cuda_compute_capabilities'
198198 3. CC set by easyconfig parameter 'cuda_compute_capabilities'
199199 """
200- default_compute_capability = None
201200 # CUDA compute capability from environment (e.g. defined by nvidia-compilers)
202201 nvcomp_cuda_cc = os .getenv ('EBNVHPCCUDACC' , None )
203202 if nvcomp_cuda_cc :
@@ -206,7 +205,7 @@ def _get_default_compute_capability(self):
206205 cfg_compute_capability = self .cfg ['cuda_compute_capabilities' ]
207206 opt_compute_capability = build_option ('cuda_compute_capabilities' )
208207 user_cuda_cc = opt_compute_capability if opt_compute_capability else cfg_compute_capability
209- if isinstance (user_cuda_cc , str ):
208+ if user_cuda_cc and isinstance (user_cuda_cc , str ):
210209 user_cuda_cc = [user_cuda_cc ] # keep compatibility with pre-nvidia-compilers NVHPC easyconfigs
211210
212211 if nvcomp_cuda_cc and user_cuda_cc and nvcomp_cuda_cc != user_cuda_cc :
@@ -219,7 +218,7 @@ def _get_default_compute_capability(self):
219218 if nvcomp_cuda_cc :
220219 default_compute_capability = nvcomp_cuda_cc
221220
222- if default_compute_capability is not None :
221+ if default_compute_capability :
223222 self .log .info (f"CUDA compute capabilities used by default in NVHPC: '{ default_compute_capability } '" )
224223
225224 return default_compute_capability
0 commit comments