warp.func#
- warp.func(
- f: Callable[[_FuncParams], _FuncReturn],
- warp.func( ) Callable[[Callable[[_FuncParams], _FuncReturn]], Callable[[_FuncParams], _FuncReturn]]
Decorator to define a Warp function callable from kernels and other Warp functions.
- Parameters:
f (Callable | None) – The Python callable to register as a Warp function.
name (str | None) – Sets the function key used for registration and native code generation. If
None, Warp derives the key fromf.module (Module | Literal['unique'] | str | None) – The Warp module in which to register the function. If
None, Warp infers the module fromf. Pass"unique"to create a new module, or a string to register the function in a named module.
See also
warp.kernel()for defining kernels that can be launched on devices.