diff --git a/cuda_core/cuda/core/system/_device.pyi b/cuda_core/cuda/core/system/_device.pyi index c758576f0ac..a8d254fdf42 100644 --- a/cuda_core/cuda/core/system/_device.pyi +++ b/cuda_core/cuda/core/system/_device.pyi @@ -798,7 +798,7 @@ class _NvlinkInfoMeta(type): To find the actual number of Nvlinks available on a device, use :py:attr:`Device.get_nvlink_count`. - .. version-deprecated:: 1.1.0 + .. deprecated:: 1.1.0 This property is deprecated and will be removed in a future release. Use :py:attr:`Device.get_nvlink_count` instead. """ @@ -1484,15 +1484,15 @@ class Device: def get_cpu_affinity(self, scope: AffinityScope | str=...) -> list[int]: """ - Retrieves a list of indices of NUMA nodes or CPU sockets with the ideal - CPU affinity for the device. + Retrieves a list of logical CPU indices with the ideal CPU affinity for + the device. For Keplerâ„¢ or newer fully supported devices. Supported on Linux only. If requested scope is not applicable to the target topology, the API - will fall back to reporting the memory affinity for the immediate non-I/O + will fall back to reporting the CPU affinity for the immediate non-I/O ancestor of the device. Parameters @@ -1504,8 +1504,9 @@ class Device: Returns ------- list[int] - A list of indices of NUMA nodes or CPU sockets with the ideal memory - affinity for the device. + A list of logical CPU indices with the ideal CPU affinity for the + device. Contrast :meth:`get_memory_affinity`, which returns NUMA + node / CPU socket indices. """ def set_cpu_affinity(self) -> None: @@ -1743,7 +1744,7 @@ class Device: For devices with NVLink support. - .. version-changed:: 1.1.0 + .. versionchanged:: 1.1.0 Any link number not supported by this specific device will raise a `ValueError`. """ @@ -1753,7 +1754,7 @@ class Device: For devices with NVLink support. - .. version-added:: 1.1.0 + .. versionadded:: 1.1.0 """ def get_nvlinks(self) -> Iterable[NvlinkInfo]: @@ -1762,7 +1763,7 @@ class Device: For devices with NVLink support. - .. version-added:: 1.1.0 + .. versionadded:: 1.1.0 """ @property diff --git a/cuda_core/cuda/core/system/_device.pyx b/cuda_core/cuda/core/system/_device.pyx index 6c81c3b9732..ae816940737 100644 --- a/cuda_core/cuda/core/system/_device.pyx +++ b/cuda_core/cuda/core/system/_device.pyx @@ -521,15 +521,15 @@ cdef class Device: def get_cpu_affinity(self, scope: AffinityScope | str=AffinityScope.NODE) -> list[int]: """ - Retrieves a list of indices of NUMA nodes or CPU sockets with the ideal - CPU affinity for the device. + Retrieves a list of logical CPU indices with the ideal CPU affinity for + the device. For Keplerâ„¢ or newer fully supported devices. Supported on Linux only. If requested scope is not applicable to the target topology, the API - will fall back to reporting the memory affinity for the immediate non-I/O + will fall back to reporting the CPU affinity for the immediate non-I/O ancestor of the device. Parameters @@ -541,8 +541,9 @@ cdef class Device: Returns ------- list[int] - A list of indices of NUMA nodes or CPU sockets with the ideal memory - affinity for the device. + A list of logical CPU indices with the ideal CPU affinity for the + device. Contrast :meth:`get_memory_affinity`, which returns NUMA + node / CPU socket indices. """ try: scope = _AFFINITY_SCOPE_MAPPING[scope] @@ -892,7 +893,7 @@ cdef class Device: For devices with NVLink support. - .. version-changed:: 1.1.0 + .. versionchanged:: 1.1.0 Any link number not supported by this specific device will raise a `ValueError`. """ link_count = self.get_nvlink_count() @@ -906,7 +907,7 @@ cdef class Device: For devices with NVLink support. - .. version-added:: 1.1.0 + .. versionadded:: 1.1.0 """ return self.get_field_values([FieldId.DEV_NVLINK_LINK_COUNT])[0].value @@ -916,7 +917,7 @@ cdef class Device: For devices with NVLink support. - .. version-added:: 1.1.0 + .. versionadded:: 1.1.0 """ for link in range(self.get_nvlink_count()): yield self.get_nvlink(link) diff --git a/cuda_core/cuda/core/system/_nvlink.pxi b/cuda_core/cuda/core/system/_nvlink.pxi index 49ac1b75ba1..20b4fbd694d 100644 --- a/cuda_core/cuda/core/system/_nvlink.pxi +++ b/cuda_core/cuda/core/system/_nvlink.pxi @@ -28,7 +28,7 @@ class _NvlinkInfoMeta(type): To find the actual number of Nvlinks available on a device, use :py:attr:`Device.get_nvlink_count`. - .. version-deprecated:: 1.1.0 + .. deprecated:: 1.1.0 This property is deprecated and will be removed in a future release. Use :py:attr:`Device.get_nvlink_count` instead. """ diff --git a/cuda_core/cuda/core/system/_system_events.pyi b/cuda_core/cuda/core/system/_system_events.pyi index 5ae5b86bc57..ad36619f803 100644 --- a/cuda_core/cuda/core/system/_system_events.pyi +++ b/cuda_core/cuda/core/system/_system_events.pyi @@ -111,9 +111,11 @@ def register_events(events: SystemEventType | str | list[SystemEventType | str]) Examples -------- >>> from cuda.core import system + >>> from cuda.core.system.typing import SystemEventType >>> events = system.register_events([SystemEventType.UNBIND]) - >>> while event := events.wait(timeout_ms=10000): - ... print(f"Event {event.event_type} occurred.") + >>> while batch := events.wait(timeout_ms=10000): + ... for i in range(len(batch)): + ... print(f"Event {batch[i].event_type} occurred.") Parameters ---------- diff --git a/cuda_core/cuda/core/system/_system_events.pyx b/cuda_core/cuda/core/system/_system_events.pyx index 87a3dfcf1ef..408c28b9103 100644 --- a/cuda_core/cuda/core/system/_system_events.pyx +++ b/cuda_core/cuda/core/system/_system_events.pyx @@ -155,9 +155,11 @@ def register_events(events: SystemEventType | str | list[SystemEventType | str]) Examples -------- >>> from cuda.core import system + >>> from cuda.core.system.typing import SystemEventType >>> events = system.register_events([SystemEventType.UNBIND]) - >>> while event := events.wait(timeout_ms=10000): - ... print(f"Event {event.event_type} occurred.") + >>> while batch := events.wait(timeout_ms=10000): + ... for i in range(len(batch)): + ... print(f"Event {batch[i].event_type} occurred.") Parameters ----------