Mojo struct
CompiledDeviceKernel
struct CompiledDeviceKernel[func_type: AnyTrivialRegType, //, func: func_type]
Aliases
LaunchArg = Variant[Dim, Int]
:
Implemented traits
AnyType
,
Copyable
,
ExplicitlyCopyable
,
Movable
,
UnknownDestructibility
Methods
__call__
__call__[*Ts: AnyType](self, device: Device, *args: *Ts, *, owned **kwargs: Variant[Dim, Int])
Launch a compiled kernel on device
.
Note: launch is async which means that you must keep args
and device
alive manually until execution of the DeviceFunction finishes.
Args:
- device (
Device
): The Device on which to launch the kernel. - *args (
*Ts
): Arguments which will be passed to the kernel on the device. These arguments must all beregister_passable
types. - **kwargs (
Variant[Dim, Int]
): grid_dim (Dim): Dimensions of grid the kernel is launched on. block_dim (Dim): Dimensions of block the kernel is launched on. shared_mem_bytes (Int): Dynamic shared memory size available to kernel.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!