cuda.core.utils.discard_prefetch#
- cuda.core.utils.discard_prefetch(targets, location=None, *, options=None, stream)#
Discard one or more managed-memory ranges and prefetch them to a target location.
- Parameters:
targets (
Buffer| Sequence[Buffer]) – One or more managed allocations to discard and re-prefetch.location (
Location|Device| int | Sequence[…]) – Target location(s). A single location applies to all targets; a sequence must matchlen(targets).options (None) – Reserved for future per-call flags. Must be
None.stream (
Stream|GraphBuilder) – Stream for the asynchronous operation (keyword-only).
- Raises:
NotImplementedError – On a CUDA 12 build of
cuda.core. Discard-and-prefetch requires CUDA 13+.