holoscan::DLManagedMemoryBufferVersioned
Wraps the deleter of a DLManagedTensorVersioned.
Versioned (DLPack >= 1.0) counterpart of DLManagedMemoryBuffer.
Inherits from: holoscan::TensorMemoryReference (public)
Constructors
DLManagedMemoryBufferVersioned
Destructor
~DLManagedMemoryBufferVersioned
Methods
retain_tensor_handle
Retain one live Tensor-handle claim on this backing allocation.
Pool-backed references may override this no-throw hook to prevent reuse while a Tensor handle or exported DLPack owner still names the allocation. The default is a no-op for references whose shared ownership already supplies the complete lifetime contract. Overrides must be thread-safe, allocation-free, and non-blocking after resource warm-up.
release_tensor_handle
Release one live Tensor-handle claim on this backing allocation.
Every successful retain is paired with exactly one release. Implementations must remain no-throw because Tensor destruction and move assignment invoke this hook. Overrides must be thread-safe, allocation-free, and non-blocking after resource warm-up.
set_deallocation_stream
Record the CUDA stream after which the backing memory may be safely reused by an allocator.
tracks_deallocation_stream
Return whether this memory reference tracks CUDA use before storage reuse.
set_readiness_stream
Record the CUDA stream that last made this Tensor’s data ready to read.
The readiness stream is independent from the deallocation stream: readiness drives producer-to-consumer synchronization for DLPack export, while deallocation drives allocator reuse after the final owner releases the memory.
has_readiness_stream_contract
Return whether this memory reference can order producer readiness against consumers.
Imported DLPack ownership wrappers generally do not know the producer stream that made the tensor data ready, so they return false; Tensor then reports unsupported readiness synchronization distinctly instead of treating it as a successful no-op.
readiness_stream
Return the retained producer-readiness stream when its identity is locally meaningful.
Runtime-owned references may expose this source-private ordering coordinate so a bounded materialization path can enqueue work after the producer without inventing another stream. Imported cross-process references return null because CUDA stream handles are process-local.
Returns: Borrowed producer stream, or null when no process-local stream identity is available.
synchronize_for_consumer
Make this Tensor’s data safe to consume on the provided CUDA stream.
References that know their producer/ready stream should record an event on it and make consumer_stream wait. References that do not own stream state leave the default no-op.
synchronize_for_host
Block the calling host thread until this Tensor’s producer stream is ready.
This is an ordering primitive only; it does not make device memory CPU-addressable.