pub enum CudaColumn {
Owned(TrackedCudaSlice<u8>),
Dlpack(DlpackColumn),
ArrowDevice(ArrowDeviceColumn),
}Expand description
Column data stored in device memory.
Most columns are owned by XLOG (Owned) and tracked against the memory budget. Columns may
also be imported via DLPack (Dlpack) or Arrow device (ArrowDevice) without copies; these are
freed via the DLPack deleter or Arrow release callback.
Variants§
Implementations§
Source§impl CudaColumn
impl CudaColumn
pub fn owned(slice: TrackedCudaSlice<u8>) -> Self
pub fn dlpack( ptr: CUdeviceptr, len_bytes: usize, stream: Arc<CudaStream>, tensor: DlpackManagedTensor, ) -> Self
Sourcepub fn dlpack_xlog_owned(
source_slice: Arc<TrackedCudaSlice<u8>>,
stream: Arc<CudaStream>,
tensor: DlpackManagedTensor,
) -> Self
pub fn dlpack_xlog_owned( source_slice: Arc<TrackedCudaSlice<u8>>, stream: Arc<CudaStream>, tensor: DlpackManagedTensor, ) -> Self
Construct a DLPack column that wraps memory xlog itself owns through the device runtime.
Use this when xlog allocated source_slice via the
runtime-backed manager and is exporting it as a DLPack
tensor for inspection by external code while retaining
ownership. The resulting column reports
Self::is_external as false and
Self::runtime_block returns the slice’s
crate::device_runtime::DeviceBlock — strict-mode
launch recorders will record it normally instead of
rejecting.
True external DLPack producers (DLPack tensors handed
to xlog by another framework) must continue to use
Self::dlpack.
pub fn arrow_device( ptr: CUdeviceptr, len_bytes: usize, stream: Arc<CudaStream>, import: Arc<ArrowDeviceImport>, ) -> Self
Sourcepub fn arrow_device_xlog_owned(
source_slice: Arc<TrackedCudaSlice<u8>>,
stream: Arc<CudaStream>,
import: Arc<ArrowDeviceImport>,
) -> Self
pub fn arrow_device_xlog_owned( source_slice: Arc<TrackedCudaSlice<u8>>, stream: Arc<CudaStream>, import: Arc<ArrowDeviceImport>, ) -> Self
Construct an Arrow device column that wraps memory
xlog itself owns through the device runtime. Same
contract as Self::dlpack_xlog_owned: identity is
preserved, strict recorders accept the column, and
drop order keeps the underlying allocation alive
through the Arrow handoff.
True external Arrow device producers must continue to
use Self::arrow_device.
pub fn stream(&self) -> &Arc<CudaStream>
pub fn device_ptr(&self) -> &CUdeviceptr
Sourcepub fn runtime_block(&self) -> Option<&DeviceBlock>
pub fn runtime_block(&self) -> Option<&DeviceBlock>
Borrow the underlying crate::device_runtime::DeviceBlock.
Returns Some(&block) when xlog owns the memory through
the runtime — Owned slices that were allocated via a
runtime-backed manager, AND Dlpack / ArrowDevice
columns constructed via the *_xlog_owned constructors
(where the source slice’s block is reachable through
the retained Arc<TrackedCudaSlice<u8>>).
Returns None for legacy cudarc-backed Owned slices
(no runtime block exists) and for true external
Dlpack / ArrowDevice columns (xlog never owned the
allocation). Strict-mode launch recorders reject None
returns; permissive recorders silently skip.
Sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
Whether this column wraps externally-managed device memory.
Returns true only for Dlpack / ArrowDevice columns
where xlog never owned the allocation (no source_slice).
Dlpack / ArrowDevice columns built via
*_xlog_owned constructors return false — xlog still
owns the memory; the DLPack / Arrow handle is just an
export wrapper.
External memory has no xlog-side runtime identity; strict launch recorders reject such columns and require callers to coordinate cross-stream synchronization themselves.