@@ -1034,20 +1034,23 @@ def make_dir(self, dir_name, clean, dontcreateinstalldir=False):
10341034
10351035 mkdir (dir_name , parents = True )
10361036
1037- def setup_cuda_cache (self ):
1037+ def set_up_cuda_cache (self ):
1038+ """Set up CUDA PTX cache."""
1039+
10381040 cuda_cache_maxsize = build_option ('cuda_cache_maxsize' )
10391041 if cuda_cache_maxsize is None :
10401042 cuda_cache_maxsize = 1 * 1024 # 1 GiB default value
10411043 else :
10421044 cuda_cache_maxsize = int (cuda_cache_maxsize )
1045+
10431046 if cuda_cache_maxsize == 0 :
1044- self .log .info (' Disabling CUDA PTX cache as per request' )
1047+ self .log .info (" Disabling CUDA PTX cache since cache size was set to zero" )
10451048 env .setvar ('CUDA_CACHE_DISABLE' , '1' )
10461049 else :
10471050 cuda_cache_dir = build_option ('cuda_cache_dir' )
10481051 if not cuda_cache_dir :
10491052 cuda_cache_dir = os .path .join (self .builddir , 'eb-cuda-cache' )
1050- self .log .info (' Enabling CUDA PTX cache of size %s MiB at %s' , cuda_cache_maxsize , cuda_cache_dir )
1053+ self .log .info (" Enabling CUDA PTX cache of size %s MiB at %s" , cuda_cache_maxsize , cuda_cache_dir )
10511054 env .setvar ('CUDA_CACHE_DISABLE' , '0' )
10521055 env .setvar ('CUDA_CACHE_PATH' , cuda_cache_dir )
10531056 env .setvar ('CUDA_CACHE_MAXSIZE' , str (cuda_cache_maxsize * 1024 * 1024 ))
@@ -2183,7 +2186,7 @@ def prepare_step(self, start_dir=True, load_tc_deps_modules=True):
21832186
21842187 # Setup CUDA cache if required. If we don't do this, CUDA will use the $HOME for its cache files
21852188 if get_software_root ('CUDA' ) or get_software_root ('CUDAcore' ):
2186- self .setup_cuda_cache ()
2189+ self .set_up_cuda_cache ()
21872190
21882191 # guess directory to start configure/build/install process in, and move there
21892192 if start_dir :
0 commit comments