cuda.bindings._v2.driver.launch_grid_async#

cuda.bindings._v2.driver.launch_grid_async(
intptr_t f,
int grid_width,
int grid_height,
intptr_t h_stream,
)#

Launches a CUDA function.

[Deprecated]. Invokes the kernel f on a grid_width x grid_height grid of blocks. Each block contains the number of threads specified by a previous call to func_set_block_shape(). The block shape, dynamic shared memory size, and parameter information must be set using func_set_block_shape(), func_set_shared_size(), param_set_size(), param_seti(), param_setf(), and param_setv() prior to calling this function. Launching a function via launch_kernel() invalidates the function’s block shape, dynamic shared memory size, and parameter information. After launching via cuLaunchKernel, this state must be re-initialized prior to calling this function. Failure to do so results in undefined behavior.

ote_null_stream.

Args:

f (intptr_t): Kernel to launch. grid_width (int): Width of grid in blocks. grid_height (int): Height of grid in blocks. h_stream (intptr_t): Stream identifier.

Note

In certain cases where cubins are created with no ABI (i.e., using ptxas --abi-compile no), this function may serialize kernel launches. The CUDA driver retains asynchronous behavior by growing the per-thread stack as needed per launch and not shrinking it afterwards.

See also

cuLaunchGridAsync