Skip to main content

LaunchAsync

Trait LaunchAsync 

Source
pub unsafe trait LaunchAsync<Params> {
    // Required methods
    unsafe fn launch(
        self,
        cfg: LaunchConfig,
        params: Params,
    ) -> Result<(), DriverError>;
    unsafe fn launch_on_stream(
        self,
        stream: &CudaStream,
        cfg: LaunchConfig,
        params: Params,
    ) -> Result<(), DriverError>;
    unsafe fn launch_cooperative(
        self,
        cfg: LaunchConfig,
        params: Params,
    ) -> Result<(), DriverError>;
}
Expand description

Old cudarc-style launch trait reimplemented on top of CUDA 13-compatible raw kernel launches.

§Safety

Implementors must preserve CUDA’s launch semantics and must not let kernel parameter storage or referenced device memory expire before the launch is enqueued on the target stream.

Required Methods§

Source

unsafe fn launch( self, cfg: LaunchConfig, params: Params, ) -> Result<(), DriverError>

Launch a kernel on the function’s default stream.

§Safety

params must match the underlying CUDA kernel ABI exactly, and all referenced device pointers must stay valid until the launch is enqueued.

Source

unsafe fn launch_on_stream( self, stream: &CudaStream, cfg: LaunchConfig, params: Params, ) -> Result<(), DriverError>

Launch a kernel on an explicit CUDA stream.

§Safety

The caller must uphold the same ABI and lifetime guarantees as launch and must ensure stream is valid for the target device.

Source

unsafe fn launch_cooperative( self, cfg: LaunchConfig, params: Params, ) -> Result<(), DriverError>

Launch a cooperative kernel.

§Safety

The caller must uphold the same ABI and lifetime guarantees as launch and must also ensure the kernel/configuration satisfies CUDA cooperative launch requirements.

Implementors§

Source§

impl LaunchAsync<&mut Vec<*mut c_void>> for CudaFunction

Source§

impl LaunchAsync<&mut [*mut c_void]> for CudaFunction

Source§

impl<A: IntoKernelParamStorage> LaunchAsync<(A,)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage> LaunchAsync<(A, B)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage> LaunchAsync<(A, B, C)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage> LaunchAsync<(A, B, C, D)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage, F: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E, F)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage, F: IntoKernelParamStorage, G: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E, F, G)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage, F: IntoKernelParamStorage, G: IntoKernelParamStorage, H: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E, F, G, H)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage, F: IntoKernelParamStorage, G: IntoKernelParamStorage, H: IntoKernelParamStorage, I: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E, F, G, H, I)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage, F: IntoKernelParamStorage, G: IntoKernelParamStorage, H: IntoKernelParamStorage, I: IntoKernelParamStorage, J: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E, F, G, H, I, J)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage, F: IntoKernelParamStorage, G: IntoKernelParamStorage, H: IntoKernelParamStorage, I: IntoKernelParamStorage, J: IntoKernelParamStorage, K: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E, F, G, H, I, J, K)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage, F: IntoKernelParamStorage, G: IntoKernelParamStorage, H: IntoKernelParamStorage, I: IntoKernelParamStorage, J: IntoKernelParamStorage, K: IntoKernelParamStorage, L: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E, F, G, H, I, J, K, L)> for CudaFunction

Source§

impl<A: IntoKernelParamStorage, B: IntoKernelParamStorage, C: IntoKernelParamStorage, D: IntoKernelParamStorage, E: IntoKernelParamStorage, F: IntoKernelParamStorage, G: IntoKernelParamStorage, H: IntoKernelParamStorage, I: IntoKernelParamStorage, J: IntoKernelParamStorage, K: IntoKernelParamStorage, L: IntoKernelParamStorage, M: IntoKernelParamStorage> LaunchAsync<(A, B, C, D, E, F, G, H, I, J, K, L, M)> for CudaFunction