Function cudarc::driver::result::launch_kernel
source · pub unsafe fn launch_kernel(
f: CUfunction,
grid_dim: (c_uint, c_uint, c_uint),
block_dim: (c_uint, c_uint, c_uint),
shared_mem_bytes: c_uint,
stream: CUstream,
kernel_params: &mut [*mut c_void]
) -> Result<(), DriverError>
Expand description
Launches a cuda functions
See cuda docs
Safety
This method is very unsafe.
- The cuda function must be a valid handle returned from a non-unloaded module.
- This is asynchronous, so the results of calling this function happen at a later point after this function returns.
- All parameters used for this kernel should have been allocated by stream (I think?)
- The cuda kernel has mutable access to every parameter, that means every parameter can change at a later point after callign this function. Even non-mutable references.