Skip to main content

CudaProviderBuilder

Struct CudaProviderBuilder 

Source
pub struct CudaProviderBuilder { /* private fields */ }
Expand description

Builds the complete production CUDA provider ownership graph.

Every provider created here owns one stream pool, one asynchronous resource stack, one runtime, and one memory manager. Providers on the same device share the canonical loaded device handle so CUDA module images are owned once per overlapping device lifetime. The same handle is shared through each provider graph; callers cannot inject mismatched allocator or device components.

Implementations§

Source§

impl CudaProviderBuilder

Source

pub fn new(device_ordinal: usize, memory_budget: MemoryBudget) -> Self

Select a CUDA device and the byte budget enforced by both the memory manager and the runtime resource stack.

Source

pub fn with_logging_sink(self, sink: Arc<dyn LoggingSink>) -> Self

Record resource lifecycle events in sink without changing allocation or budget semantics.

Source

pub fn with_runtime_budget_limit(self, bytes: u64) -> Self

Set the global runtime-resource byte limit independently of the memory manager limit. By default both layers use memory_budget.device_bytes.

Source

pub fn with_stream_capacity(self, stream_capacity: usize) -> Self

Set the maximum number of pooled streams for workloads that need more concurrent lanes than the production default.

Source

pub fn build(self) -> Result<CudaKernelProvider>

Construct and validate the complete provider-owned runtime.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.