File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
cuda_core/cuda/core/system Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ cdef class NvlinkInfo:
2020 @property
2121 def version (self ) -> NvLinkVersion:
2222 """
23- Retrieves the NvLink version for the device.
23+ Retrieves the NvLink version for the device and link .
2424
2525 For all products with NvLink support.
2626
@@ -31,4 +31,22 @@ cdef class NvlinkInfo:
3131 """
3232 return NvlinkVersion(nvml.device_get_nvlink_version(self._device._handle , self._link ))
3333
34+ @property
35+ def state(self ) -> bool:
36+ """
37+ Retrieves the state of the device's NvLink for the device and link specified.
38+
39+ For Pascal &tm; or newer fully supported devices.
40+
41+ For all products with NvLink support.
42+
43+ Returns
44+ -------
45+
46+ `True` if the NvLink is active , `False` otherwise.
47+ """
48+ return (
49+ nvml.device_get_nvlink_state(self._device._handle , self._link ) == nvml.EnableState.FEATURE_ENABLED
50+ )
51+
3452 max_links = nvml.NVLINK_MAX_LINKS
You can’t perform that action at this time.
0 commit comments