cuda.core.utils.prefetch#

cuda.core.utils.prefetch(targets, location=None, *, options=None, stream)#

Prefetch one or more managed-memory ranges to a target location.

Parameters:
  • targets (Buffer | Sequence[Buffer]) – One or more managed allocations to operate on.

  • location (Location | Device | int | Sequence[…]) – Target location(s). A single location applies to all targets; a sequence must match len(targets). Device and int values are coerced to Location (-1 maps to host).

  • options (None) – Reserved for future per-call flags. Must be None.

  • stream (Stream | GraphBuilder) – Stream for the asynchronous prefetch (keyword-only).

Raises:

NotImplementedError – If len(targets) > 1 on a CUDA 12 build of cuda.core.