IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 the mo.reduce.arg_max graph op with the graph compiler.
  • ArgMin: Registers the mo.reduce.arg_min graph op with the graph compiler.
  • ArgNonZero: Registers the mo.arg_nonzero graph op with the graph compiler.
  • ArgSort: Registers the mx.argsort graph op with the graph compiler.
  • BottomK: Registers the mo.bottom_k graph op with the graph compiler.
  • CumSum: Registers the mo.cumsum graph op with the graph compiler.
  • LayerNorm: Registers the mo.reduce.layer_norm graph op with the graph compiler.
  • LogSoftmax: Registers the mo.reduce.logsoftmax graph op with the graph compiler.
  • Mean: Registers the mo.reduce.mean graph op with the graph compiler.
  • ReduceAdd: Registers the mo.reduce.add graph op with the graph compiler.
  • ReduceGroupNorm: Registers the mo.reduce.group_norm graph op with the graph compiler.
  • ReduceMax: Registers the mo.reduce.max graph op with the graph compiler.
  • ReduceMin: Registers the mo.reduce.min graph op with the graph compiler.
  • ReduceMinAndMax: Registers the mo.reduce.reduce_min_and_max graph op with the graph compiler.
  • ReduceMul: Registers the mo.reduce.mul graph op with the graph compiler.
  • ReduceRMSNorm: Registers the mo.reduce.rms_norm graph op with the graph compiler.
  • ReduceRMSNormFusedResidualAdd: Registers the mo.composite.rms_norm_fused_residual_add graph 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.
  • Softmax: Registers the mo.reduce.softmax graph op with the graph compiler.
  • TopK: Registers the mo.top_k graph op with the graph compiler.

Functions