pub struct CuvsResources { /* private fields */ }Expand description
One serialized cuVS resource generation for an exact cudf runtime binding.
cuVS 26.08 supports stream selection but no memory-resource setter. The bridge
requires runtimes configured with the process-lifetime current
cudf::DeviceMemoryManager resource. Stream reservations remain supported by
routing allocations by stream through that manager resource.
Implementations§
Source§impl CuvsResources
impl CuvsResources
Sourcepub unsafe fn activate_prepared_tensor<'export, 'producer, 'consumer, T: DeviceElement>(
&'consumer self,
export: &'export PreparedColumnExport<'producer>,
shape: &[usize],
strides: Option<&[usize]>,
) -> Result<PreparedTensorLease<'export, 'producer, 'consumer, T>>
pub unsafe fn activate_prepared_tensor<'export, 'producer, 'consumer, T: DeviceElement>( &'consumer self, export: &'export PreparedColumnExport<'producer>, shape: &[usize], strides: Option<&[usize]>, ) -> Result<PreparedTensorLease<'export, 'producer, 'consumer, T>>
Activates a fixed-width prepared column as a tensor on this runtime.
§Safety
For an export without a retained storage owner, the caller must finish
all queued tensor reads before the producer borrow ends, including when
the lease is forgotten. Call complete after the last submission and
keep storage alive through any subsequent error cleanup. A destructor
alone cannot guarantee this for borrowed asynchronous input. Exports
with retained owners keep those owners in the active lease.
use cudf::interop::contract::PreparedColumnExport;
use cuvs::CuvsResources;
fn activate(resources: &CuvsResources, export: &PreparedColumnExport<'_>) {
let _ = resources.activate_prepared_tensor::<f32>(export, &[3], None);
}Sourcepub fn activate_validated_fixed_size_list_tensor<'witness, 'producer, 'consumer, T: DeviceElement>(
&'consumer self,
validated: &'witness ValidatedFixedSizeListExport<'producer>,
) -> Result<PreparedValidatedTensorLease<'witness, 'witness, 'consumer, T>>
pub fn activate_validated_fixed_size_list_tensor<'witness, 'producer, 'consumer, T: DeviceElement>( &'consumer self, validated: &'witness ValidatedFixedSizeListExport<'producer>, ) -> Result<PreparedValidatedTensorLease<'witness, 'witness, 'consumer, T>>
Activate a structurally validated numeric FixedSizeList
child as a row-major tensor under the retained root export’s single
read lease.
Tensor dimensions are verified against the cuDF witness proving uniform list-offset deltas across active rows.
Sourcepub fn activate_validated_uniform_list_tensor<'witness, 'producer, 'consumer, T: DeviceElement>(
&'consumer self,
validated: &'witness ValidatedUniformListExport<'producer>,
) -> Result<PreparedValidatedTensorLease<'witness, 'witness, 'consumer, T>>
pub fn activate_validated_uniform_list_tensor<'witness, 'producer, 'consumer, T: DeviceElement>( &'consumer self, validated: &'witness ValidatedUniformListExport<'producer>, ) -> Result<PreparedValidatedTensorLease<'witness, 'witness, 'consumer, T>>
Activate a structurally validated runtime-uniform
numeric List child as a row-major tensor under the retained root
export’s single read lease.
Tensor dimensions are derived directly from the cuDF witness of active list-offset widths.
Sourcepub fn pack_validated_fixed_size_list<T: DeviceElement>(
&self,
validated: &ValidatedFixedSizeListExport<'_>,
layout: MatrixLayout,
) -> Result<OwnedMatrix<T>>
pub fn pack_validated_fixed_size_list<T: DeviceElement>( &self, validated: &ValidatedFixedSizeListExport<'_>, layout: MatrixLayout, ) -> Result<OwnedMatrix<T>>
Copy a validated numeric FixedSizeList child into a private
matrix in the requested layout on this exact runtime binding.
Sourcepub fn pack_validated_uniform_list<T: DeviceElement>(
&self,
validated: &ValidatedUniformListExport<'_>,
layout: MatrixLayout,
) -> Result<OwnedMatrix<T>>
pub fn pack_validated_uniform_list<T: DeviceElement>( &self, validated: &ValidatedUniformListExport<'_>, layout: MatrixLayout, ) -> Result<OwnedMatrix<T>>
Copy a validated runtime-uniform numeric List child into a
private matrix in the requested layout on this exact runtime binding.
Sourcepub fn pack_prepared_table<T: DeviceElement>(
&self,
export: &PreparedTableExport<'_>,
layout: MatrixLayout,
) -> Result<OwnedMatrix<T>>
pub fn pack_prepared_table<T: DeviceElement>( &self, export: &PreparedTableExport<'_>, layout: MatrixLayout, ) -> Result<OwnedMatrix<T>>
Atomically import one prepared table root and pack all top-level columns into an owned numeric matrix on this exact runtime binding.
Source§impl CuvsResources
impl CuvsResources
pub fn for_runtime(runtime: Arc<Runtime>) -> Result<Self>
Sourcepub fn stream_pool_coverage(
&self,
reservation: Option<&StreamReservationLease>,
) -> Result<StreamPoolCoverage>
pub fn stream_pool_coverage( &self, reservation: Option<&StreamReservationLease>, ) -> Result<StreamPoolCoverage>
Cover every RAFT pool stream with siblings of the runtime stream’s reservation.
When reservation is None, allocations route to the device manager’s backend resource.