Skip to main content

multi_launch_async

Function multi_launch_async 

Source
pub fn multi_launch_async(
    launches: &[(&Kernel, &LaunchParams)],
    args_list: &[&dyn ErasedKernelArgs],
    stream: &Stream,
    config: &AsyncLaunchConfig,
) -> CudaResult<LaunchCompletion>
Expand description

Launches multiple kernels on the same stream and returns a combined LaunchCompletion future that resolves when all have finished.

A single event is recorded after all kernels have been enqueued, so the future resolves once the last kernel in the batch completes.

§Parameters

  • launches — a slice of (&Kernel, &LaunchParams, param_ptrs) tuples. Each entry’s param_ptrs is the result of calling KernelArgs::as_param_ptrs() on the kernel’s arguments.
  • stream — the stream on which to enqueue all kernels.
  • config — async launch configuration.

§Errors

Returns the first CudaError encountered during any kernel launch or event operation.