Skip to content

Commit 3c77f31

Browse files
authored
Merge branch 'main' into fix/pytorch-2-12-version-cap
2 parents ab35b38 + 92994e4 commit 3c77f31

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cuda_core/cuda/core/_utils/enum_explanations_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535
def _binding_version() -> tuple[int, int, int]:
3636
"""Return the installed ``cuda-bindings`` version, or a conservative old value."""
3737
try:
38-
parts = importlib.metadata.version("cuda-bindings").split(".")[:3]
38+
version = importlib.metadata.version("cuda-bindings")
3939
except importlib.metadata.PackageNotFoundError:
4040
return (0, 0, 0) # For very old versions of cuda-python
41+
42+
parts = version.partition("+")[0].split(".")[:3]
4143
return tuple(int(v) for v in parts)
4244

4345

0 commit comments

Comments
 (0)