For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
launch
def launch[Body: RowBody, //, axis: Int, simd_width: Int, supports_splitk: Bool = True, computationally_expensive: Bool = False, BLOCK_SIZE: Int = Int(256), COOPERATIVE_BLOCK_SIZE: Int = Int(128), WARP_BLOCK_WARPS: Int = Int(4), num_phases: Int = Int(0), dtype_size: Int = Int(0), name: StaticString = "rowwise", pdl_level: PDLLevel = PDLLevel.OVERLAP_AT_BEGINNING](body: Body, shape: Coord[*shape.element_types], ctx: DeviceContext)
Top-level scaffolder. Picks the tier from shape + axis, instantiates the matching kernel, and launches. See _launch.
Parameters:
- axis (
Int): Axis being reduced. - simd_width (
Int): SIMD width for tile dispatch. - supports_splitk (
Bool): Whether the body can run in the split-K tier. - computationally_expensive (
Bool): Per-element work is heavy. - BLOCK_SIZE (
Int): Threads per block for the inner-axis block tier. - COOPERATIVE_BLOCK_SIZE (
Int): Threads per block for the cooperative tier. - WARP_BLOCK_WARPS (
Int): Warps per block for the warp tier. - num_phases (
Int): Per-element-output split-K opt-in. - dtype_size (
Int): Byte size of the body's primary dtype. - name (
StaticString): Operation name for the tier kernels'@__name. - pdl_level (
PDLLevel): Programmatic dependent launch level of the tier kernels.
Args:
- body (
Body): The per-row computation. - shape (
Coord[*shape.element_types]): Tensor shape. - ctx (
DeviceContext): Device context.
Raises:
If the underlying GPU kernel launch fails.