Skip to main content

StreamAllocator

Trait StreamAllocator 

Source
pub trait StreamAllocator: Send + Sync {
    // Required method
    fn acquire(&self, hints: ActorHints) -> Arc<CudaStream>;

    // Provided method
    fn release(&self, _stream: Arc<CudaStream>) { ... }
}
Expand description

Pluggable stream allocator (§5.7). Implemented by PerActorAllocator (F1 default) and three stubs.

Required Methods§

Source

fn acquire(&self, hints: ActorHints) -> Arc<CudaStream>

Acquire a stream for a KernelActor that’s just starting.

Provided Methods§

Source

fn release(&self, _stream: Arc<CudaStream>)

Release the stream when the KernelActor stops. Default no-op because most strategies treat streams as owned by the allocator, not the caller.

Implementors§