pub fn export_slice_managed_tensor(
slice: Arc<TrackedCudaSlice<u8>>,
device_id: i32,
dtype: DLDataType,
rows: usize,
cols: usize,
) -> Result<DlpackManagedTensor>Expand description
Export an xlog-owned runtime-backed slice as a 2-D DLPack managed
tensor without copies. The manager context holds the slice’s Arc,
so the export shares the exact producer allocation and the memory
stays alive until the consumer’s deleter runs; xlog remains the
owner throughout. The declared rows x cols x dtype view must
cover the allocation exactly — a mismatched shape is a typed error,
never a truncated or padded view.