cuda.core.Host#
- class cuda.core.Host(numa_id: int | None = None, *, is_numa_current: bool = False)#
Host (CPU) location for managed-memory operations.
Use one of the following forms:
Host()— generic host (any NUMA node).Host(numa_id=N)— specific NUMA nodeN.Host.numa_current()orHost(is_numa_current=True)— NUMA node of the calling thread.numa_idandis_numa_currentare mutually exclusive.
Hostis the symmetric counterpart ofDevicefor managed-memory prefetch, advise, and discard_prefetch targets. Pass either aDeviceor aHostto those operations and toManagedBuffer.preferred_location/accessed_by.Hostis a singleton class, mirroringDevice: constructor calls with the same arguments return the same instance, soHost() is Host()andHost(numa_id=1) is Host(numa_id=1).Host.numa_current()returns its own singleton, distinct fromHost()because it represents a thread-relative location rather than a fixed one.Methods
- __init__()#
Attributes