Skip to content

Commit 2703a9c

Browse files
committed
Simplify cuda_core nvml version check
1 parent 97c5b2a commit 2703a9c

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

cuda_core/cuda/core/system/_system.pyx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,15 @@ try:
1515
except ImportError:
1616
CUDA_BINDINGS_NVML_IS_COMPATIBLE = False
1717
else:
18-
CUDA_BINDINGS_NVML_IS_COMPATIBLE = _BINDINGS_VERSION >= (13, 1, 2) or (_BINDINGS_VERSION[0] == 12 and _BINDINGS_VERSION[1:3] >= (9, 6))
18+
CUDA_BINDINGS_NVML_IS_COMPATIBLE = _BINDINGS_VERSION >= (13, 2, 0) or (_BINDINGS_VERSION[0] == 12 and _BINDINGS_VERSION[1:3] >= (9, 6))
1919

2020

2121
if CUDA_BINDINGS_NVML_IS_COMPATIBLE:
2222
try:
2323
from cuda.bindings import nvml
2424
except ImportError:
2525
CUDA_BINDINGS_NVML_IS_COMPATIBLE = False
26-
else:
27-
# TODO: We need to be even more specific than version numbers for development.
28-
# This can be removed once we have a release including everything we need.
29-
for member in ["FieldId", "ClocksEventReasons"]:
30-
if not hasattr(nvml, member):
31-
CUDA_BINDINGS_NVML_IS_COMPATIBLE = False
32-
break
3326

34-
if CUDA_BINDINGS_NVML_IS_COMPATIBLE:
3527
from ._nvml_context import initialize
3628
else:
3729
from cuda.core._utils.cuda_utils import driver, handle_return, runtime

0 commit comments

Comments
 (0)