Skip to main content

CuvsResources

Struct CuvsResources 

Source
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

Source

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);
}
Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

pub fn for_runtime(runtime: Arc<Runtime>) -> Result<Self>

Source

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.

Source

pub fn runtime(&self) -> &Arc<Runtime> ⓘ

Source

pub fn device(&self) -> DeviceId

Source

pub fn binding_id(&self) -> ExecutionBindingId

Trait Implementations§

Source§

impl Debug for CuvsResources

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.