warp.Launch#
- class warp.Launch(
- kernel,
- device,
- hooks=None,
- params=None,
- params_addr=None,
- bounds=None,
- max_blocks=0,
- block_dim=256,
- adjoint=False,
Represents all data required for a kernel launch so that launches can be replayed quickly.
Users should not directly instantiate this class, instead use
wp.launch(..., record_cmd=True)to record a launch.- Parameters:
device (Device)
hooks (KernelHooks | None)
params (Sequence[Any] | None)
params_addr (Sequence[ctypes.c_void_p] | None)
bounds (launch_bounds_t | None)
max_blocks (int)
block_dim (int)
adjoint (bool)
- __init__(
- kernel,
- device,
- hooks=None,
- params=None,
- params_addr=None,
- bounds=None,
- max_blocks=0,
- block_dim=256,
- adjoint=False,
Methods
__init__(kernel, device[, hooks, params, ...])launch([stream])Launch the kernel.
set_dim(dim)Set the launch dimensions.
set_param_at_index(index, value[, adjoint])Set a kernel parameter at an index.
set_param_at_index_from_ctype(index, value)Set a kernel parameter at an index without any type conversion.
set_param_by_name(name, value[, adjoint])Set a kernel parameter by argument name.
set_param_by_name_from_ctype(name, value)Set a kernel parameter by argument name with no type conversions.
set_params(values)Set all parameters.
set_params_from_ctypes(values)Set all parameters without performing type-conversions.
Attributes
The device to launch on.
The launch bounds.
The maximum number of CUDA thread blocks to use.
The number of threads per block.
Whether to run the adjoint kernel instead of the forward kernel.
- device: Device#
The device to launch on. This should not be changed after the launch object is created.
- set_param_at_index_from_ctype(index, value)[source]#
Set a kernel parameter at an index without any type conversion.
- set_param_by_name_from_ctype(name, value)[source]#
Set a kernel parameter by argument name with no type conversions.