File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ def check_gpus_compute_capability(min_capability):
312
312
313
313
import importlib .util
314
314
315
- if importlib .util .find_spec ("cuda.core.experimental" ) :
315
+ if importlib .util .find_spec ("cuda" ) is not None :
316
316
import cuda .core .experimental as cuda_core_experimental
317
317
318
318
devices = cuda_core_experimental .system .devices
@@ -325,7 +325,7 @@ def check_gpus_compute_capability(min_capability):
325
325
if compute_capability < min_capability :
326
326
return False
327
327
328
- elif importlib .util .find_spec ("pycuda.driver" ) :
328
+ elif importlib .util .find_spec ("pycuda" ) is not None :
329
329
import pycuda .driver as cuda
330
330
331
331
cuda .init ()
@@ -339,6 +339,10 @@ def check_gpus_compute_capability(min_capability):
339
339
340
340
if compute_capability_value < min_capability :
341
341
return False
342
+ else :
343
+ raise RuntimeError (
344
+ "No packages found to determine the compute capability. Please check the environment."
345
+ )
342
346
343
347
return True
344
348
You can’t perform that action at this time.
0 commit comments