File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
cuda_bindings/cuda/bindings/_path_finder Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -167,14 +167,6 @@ def _get_nvvm_wheel():
167
167
return None
168
168
169
169
170
- def get_major_cuda_version ():
171
- # TODO: remove once cuda-python is
172
- # a hard dependency
173
- from numba .cuda .cudadrv .runtime import get_version
174
-
175
- return get_version ()[0 ]
176
-
177
-
178
170
def get_nvrtc_dso_path ():
179
171
site_paths = [site .getusersitepackages ()] + site .getsitepackages ()
180
172
for sp in site_paths :
@@ -185,21 +177,21 @@ def get_nvrtc_dso_path():
185
177
("bin" if IS_WIN32 else "lib" ) if sp else None ,
186
178
)
187
179
if lib_dir and os .path .exists (lib_dir ):
188
- try :
189
- major = get_major_cuda_version ()
180
+ for major in (12 , 11 ):
190
181
if major == 11 :
191
182
cu_ver = "112" if IS_WIN32 else "11.2"
192
183
elif major == 12 :
193
184
cu_ver = "120" if IS_WIN32 else "12"
194
185
else :
195
186
raise NotImplementedError (f"CUDA { major } is not supported" )
196
187
197
- return os .path .join (
188
+ dso_path = os .path .join (
198
189
lib_dir ,
199
190
f"nvrtc64_{ cu_ver } _0.dll" if IS_WIN32 else f"libnvrtc.so.{ cu_ver } " ,
200
191
)
201
- except RuntimeError :
202
- continue
192
+ if os .path .isfile (dso_path ):
193
+ return dso_path
194
+ return None
203
195
204
196
205
197
def _get_nvrtc_wheel ():
You can’t perform that action at this time.
0 commit comments