Skip to content

Commit 10f0523

Browse files
committed
Guard NVLink 6 mapping for older bindings
1 parent 84b21cd commit 10f0523

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎cuda_core/cuda/core/system/_nvlink.pxi‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ _NVLINK_VERSION_MAPPING = {
1111
nvml.NvlinkVersion.VERSION_3_1: (3, 1),
1212
nvml.NvlinkVersion.VERSION_4_0: (4, 0),
1313
nvml.NvlinkVersion.VERSION_5_0: (5, 0),
14-
nvml.NvlinkVersion.VERSION_6_0: (6, 0),
1514
}
1615

16+
_NVLINK_VERSION_6_0 = getattr(nvml.NvlinkVersion, "VERSION_6_0", None)
17+
if _NVLINK_VERSION_6_0 is not None:
18+
_NVLINK_VERSION_MAPPING[_NVLINK_VERSION_6_0] = (6, 0)
19+
1720

1821
cdef class NvlinkInfo:
1922
"""

0 commit comments

Comments
 (0)