Skip to content

Commit 1e11c4a

Browse files
committed
docs(cuda.core): say which numa_id to use on a system without NUMA
The numa_id docstring points to Device.properties.host_numa_id, which is -1 on a system without NUMA, and numa_id rejects -1. cuMemCreate wants location id 0 on such a system, so say that in the docstring. Signed-off-by: Som Tripathi <[email protected]>
1 parent c33542b commit 1e11c4a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎cuda_core/cuda/core/_memory/_virtual_memory_resource.pyi‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ class VirtualMemoryResourceOptions:
5858
Host NUMA node of the allocation. Required for
5959
``location_type="host_numa"`` and rejected for every other location
6060
type. Must be >= 0; ``Device.properties.host_numa_id`` is the node
61-
closest to a device.
61+
closest to a device. On a system without NUMA, ``host_numa_id`` is -1
62+
and the driver expects ``numa_id=0``.
6263
"""
6364
allocation_type: VirtualMemoryAllocationType = VirtualMemoryAllocationType.PINNED
6465
location_type: VirtualMemoryLocationType = VirtualMemoryLocationType.DEVICE

‎cuda_core/cuda/core/_memory/_virtual_memory_resource.pyx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ class VirtualMemoryResourceOptions:
127127
Host NUMA node of the allocation. Required for
128128
``location_type="host_numa"`` and rejected for every other location
129129
type. Must be >= 0; ``Device.properties.host_numa_id`` is the node
130-
closest to a device.
130+
closest to a device. On a system without NUMA, ``host_numa_id`` is -1
131+
and the driver expects ``numa_id=0``.
131132
"""
132133

133134
allocation_type: VirtualMemoryAllocationType = VirtualMemoryAllocationType.PINNED

0 commit comments

Comments
 (0)