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
impl CudaProviderBuilder
Sourcepub fn new(device_ordinal: usize, memory_budget: MemoryBudget) -> Self
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.
Sourcepub fn with_logging_sink(self, sink: Arc<dyn LoggingSink>) -> Self
pub fn with_logging_sink(self, sink: Arc<dyn LoggingSink>) -> Self
Record resource lifecycle events in sink without changing allocation
or budget semantics.
Sourcepub fn with_runtime_budget_limit(self, bytes: u64) -> Self
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.
Sourcepub fn with_stream_capacity(self, stream_capacity: usize) -> Self
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.
Sourcepub fn build(self) -> Result<CudaKernelProvider>
pub fn build(self) -> Result<CudaKernelProvider>
Construct and validate the complete provider-owned runtime.