cuda.core.utils.discard_batch#

cuda.core.utils.discard_batch(
stream: Stream | GraphBuilder,
buffers: Sequence[Buffer],
) None#

Discard a batch of managed-memory ranges.

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

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

  • buffers (Sequence[Buffer]) – Two or more managed allocations to discard. Resident pages are released without prefetching new contents; subsequent access is satisfied by lazy migration.

Raises:

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