cuda.core.managed_memory.prefetch#

cuda.core.managed_memory.prefetch(
Buffer target: Buffer,
location: Device | int | None = None,
*,
stream: Stream | GraphBuilder,
str location_type: str | None = None,
)#

Prefetch a managed-memory allocation range to a target location.

Parameters:
  • target (Buffer) – Managed allocation to operate on.

  • location (Device | int | None, optional) – Target location. When location_type is None, values are interpreted as a device ordinal, -1 for host, or None. A location is required for prefetch.

  • stream (Stream | GraphBuilder) – Keyword argument specifying the stream for the asynchronous prefetch.

  • location_type (str | None, optional) – Explicit location kind. Supported values are "device", "host", "host_numa", and "host_numa_current".