cuda.core.utils.discard_prefetch_batch#

cuda.core.utils.discard_prefetch_batch(
stream: Stream | GraphBuilder,
buffers: Sequence[Buffer],
locations: Device | Host | Sequence[Device | Host],
) None#

Discard a batch of managed-memory ranges and prefetch them to target locations.

Requires CUDA 13+. For a single buffer, use ManagedBuffer.discard_prefetch() instead.

Parameters:
  • stream (Stream | GraphBuilder) – Stream for the asynchronous operation. First positional, required (mirrors launch()).

  • buffers (Sequence[Buffer]) – Two or more managed allocations to discard and re-prefetch.

  • locations (Device | Host | Sequence[…]) – Target location(s). A single location applies to all buffers; a sequence must match len(buffers).

Raises:

NotImplementedError – On a CUDA 12 build of cuda.core.