Streams and receipts#

A host read finishes before returning its NumPy output. Passing a caller-owned array keeps its identity and strides. Decoding compressed blocks can still use temporary storage; the read receipt reports known staging and copy counts.

With return_receipt=True, ordinary read returns (array, receipt). Inspect route, output_residency, fallback, synchronized, wait_count and transfer counters to establish what ran. A value of None means unknown; it is not a measured zero. Device output alone does not establish GPUDirect Storage or the absence of compressed-byte staging inside a foreign codec. See the Python read contract for the complete receipt and resolution-selection behavior.

Ordinary device reads order writes before subsequent work on the selected stream; consumers on other streams establish their own dependencies. Plain nvTIFF array reads retain execution resources for background retirement after return. Reader close drains its jobs before batch-session and source teardown; keep its borrowed CUDA context alive through close. Requesting a completed receipt waits, observes errors and closes execution resources. JPEG2000 and other paths retain waits required for SDK safety or host-observed codec errors.

Advanced CUDA operations expose separate preparation, enqueue, query, wait and close calls. Keep the CUDA context, stream and every borrowed allocation valid through successful close. Python execution objects retain their supplied owners. A failed retryable close keeps the native handle for retry; finalizers cannot serve as an error-reporting boundary. The pixel execution contract and prepared device-read lifecycle state which context must be current and what each close drains.

Unknown foreign-codec scratch and transfers remain outside measured counters. A configured memory cap and observed requested bytes answer different questions; neither establishes total physical device memory. See structured observability for advanced chronology and the limits of static transfer guards.