Skip to navigation

holoscan::make_tensor_from_dlpack

Beta
View as Markdown
HOLOSCAN_CORE_EXPORT expected<Tensor, Error> holoscan::make_tensor_from_dlpack(
DLManagedTensor *dl_managed_tensor_ptr
)

Create a Tensor from an unversioned DLManagedTensor, validating the producer handle.

The unversioned source is treated as a current-version tensor and permanently narrowed to read-only authority because imported ownership does not establish a local writer claim. On success the returned Tensor owns the producer’s DLPack deleter (invoked when the last reference is released).

Returns: The imported Tensor, or an Error (kInvalidArgument) if the pointer is null.

Parameters

dl_managed_tensor_ptr
DLManagedTensor *

A pointer to the DLManagedTensor to import.