File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 99# 1. Config setting "CUDA_ENABLE_PYNVJITLINK" (highest priority)
1010# 2. Environment variable "NUMBA_CUDA_ENABLE_PYNVJITLINK"
1111# 3. Auto-detection of pynvjitlink module (lowest priority)
12+
13+ pynvjitlink_auto_enabled = False
14+
1215if getattr (config , "CUDA_ENABLE_PYNVJITLINK" , None ) is None :
1316 if (
1417 _pynvjitlink_enabled_in_env := _readenv (
1720 ) is not None :
1821 config .CUDA_ENABLE_PYNVJITLINK = _pynvjitlink_enabled_in_env
1922 else :
20- config . CUDA_ENABLE_PYNVJITLINK = (
23+ pynvjitlink_auto_enabled = (
2124 importlib .util .find_spec ("pynvjitlink" ) is not None
2225 )
26+ config .CUDA_ENABLE_PYNVJITLINK = pynvjitlink_auto_enabled
2327
2428# Upstream numba sets CUDA_USE_NVIDIA_BINDING to 0 by default, so it always
2529# exists. Override, but not if explicitly set to 0 in the envioronment.
5357 "NVIDIA bindings are enabled. cuda.core will be used "
5458 "in place of pynvjitlink."
5559 )
60+ elif pynvjitlink_auto_enabled :
61+ # Ignore the fact that pynvjitlink is enabled, because that was an
62+ # automatic decision based on discovering pynvjitlink was present; the
63+ # user didn't ask for it
64+ pass
5665 else :
5766 raise RuntimeError ("nvJitLink requires the NVIDIA CUDA bindings. " )
5867
You can’t perform that action at this time.
0 commit comments