Skip to main content

run_pipeline

Function run_pipeline 

Source
pub async fn run_pipeline<S: PipelineStage>(
    stages: &mut [S],
    streams: &[Arc<CudaStream>],
    completion: &Arc<dyn CompletionStrategy>,
    input: S::In,
) -> Result<S::Out, GpuError>
where S::Out: From<S::In>,
Expand description

Run a homogeneous sequence of stages on streams[i] for stage i.

Caller supplies one stream per stage (use crate::stream::PerActorAllocator to mint them). The executor enqueues all stages, hooking each stage’s returned event into the next stage’s wait_for, then awaits one HostFnCompletion on the last stream.