cuda.core.utils.discard#

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

Discard one or more managed-memory ranges.

Parameters:
  • targets (Buffer | Sequence[Buffer]) – One or more managed allocations to discard. Their resident pages are released without prefetching new contents; subsequent access is satisfied by lazy migration.

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

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

Raises:

NotImplementedError – On a CUDA 12 build of cuda.core. Discard requires CUDA 13+.