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 module
reductions
Registers reduction graph ops (sum, mean, argmax, and related) over tensor axes.
comptime values
logger
comptime logger = Logger(stdout, prefix=String(""), source_location=False)
Logger for the reductions module.
Structs
-
ApplyQKRMSNorm: Fused per-element QK-RMSNorm apply for two operands Q and K. -
ArgMax: Registers themo.reduce.arg_maxgraph op with the graph compiler. -
ArgMin: Registers themo.reduce.arg_mingraph op with the graph compiler. -
ArgNonZero: Registers themo.arg_nonzerograph op with the graph compiler. -
ArgSort: Registers themx.argsortgraph op with the graph compiler. -
BottomK: Registers themo.bottom_kgraph op with the graph compiler. -
CumSum: Registers themo.cumsumgraph op with the graph compiler. -
LayerNorm: Registers themo.reduce.layer_normgraph op with the graph compiler. -
LayerNormRopeRagged: Registers themo.composite.layer_norm_rope_raggedgraph op with the graph compiler. -
ReduceGroupNorm: Registers themo.reduce.group_normgraph op with the graph compiler. -
ReduceMinAndMax: Registers themo.reduce.reduce_min_and_maxgraph op with the graph compiler. -
ReduceRMSNormFusedResidualAdd: Registers themo.composite.rms_norm_fused_residual_addgraph op with the graph compiler. -
ReduceRMSNormRoPE: Fuses RMS normalization and Rotary Position Embedding (RoPE) into one operation. -
RMSNormResidualAdd: Fused single-norm residual-add + RMSNorm. -
RowMeanOfSquares: Per-row mean of squares over the last axis, accumulated in float32. -
RowMeanOfSquaresQK: Fused per-row mean of squares for two operands Q and K. -
TopK: Registers themo.top_kgraph op with the graph compiler. -
TopKPerRow: Registers thereduction.top_k.per_rowgraph op with the graph compiler.
Functions
-
arg_nonzero_shape: Computes the output shape for themo.arg_nonzerograph op. -
bottom_k_shape: Computes the output shape for themo.bottom_kgraph op. -
composite_layer_norm_rope_ragged_shape: Computes the output shape for themo.composite.layer_norm_rope_raggedgraph op. -
composite_rms_norm_fused_residual_add_shape: Computes the output shape for themo.composite.rms_norm_fused_residual_addgraph op. -
composite_rms_norm_residual_add_shape: -
composite_rms_norm_rope_shape: Computes the output shape for themo.composite.rms_norm_ropegraph op. -
reduce_group_norm_shape: Computes the output shape for themo.reduce.group_normgraph op. -
reduce_layer_norm_shape: Computes the output shape for themo.reduce.layer_normgraph op. -
reduce_reduce_min_and_max_shape: Computes the output shape for themo.reduce.reduce_min_and_maxgraph op. -
reduce_row_mean_of_squares_qk_shape: Computes the output shape for thereduction.row_mean_of_squares_qkgraph op. -
reduce_row_mean_of_squares_shape: Computes the output shape for thereduction.row_mean_of_squaresgraph op. -
top_k_shape: Computes the output shape for themo.top_kgraph op.