For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/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. - β
LogSoftmax: Registers themo.reduce.logsoftmaxgraph op with the graph compiler. - β
Mean: Registers themo.reduce.meangraph op with the graph compiler. - β
ReduceAdd: Registers themo.reduce.addgraph op with the graph compiler. - β
ReduceGroupNorm: Registers themo.reduce.group_normgraph op with the graph compiler. - β
ReduceMax: Registers themo.reduce.maxgraph op with the graph compiler. - β
ReduceMin: Registers themo.reduce.mingraph op with the graph compiler. - β
ReduceMinAndMax: Registers themo.reduce.reduce_min_and_maxgraph op with the graph compiler. - β
ReduceMul: Registers themo.reduce.mulgraph op with the graph compiler. - β
ReduceRMSNorm: Registers themo.reduce.rms_normgraph 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. - β
Softmax: Registers themo.reduce.softmaxgraph op with the graph compiler. - β
TopK: Registers themo.top_kgraph 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_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_add_shape: Computes the output shape for themo.reduce.addgraph 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_max_shape: Computes the output shape for themo.reduce.maxgraph op. - β
reduce_mean_shape: Computes the output shape for themo.reduce.meangraph op. - β
reduce_min_shape: Computes the output shape for themo.reduce.mingraph op. - β
reduce_mul_shape: Computes the output shape for themo.reduce.mulgraph op. - β
reduce_reduce_min_and_max_shape: Computes the output shape for themo.reduce.reduce_min_and_maxgraph op. - β
reduce_rms_norm_shape: Computes the output shape for themo.reduce.rms_normgraph op. - β
reduce_row_mean_of_squares_qk_shape: Computes the output shape for themo.reduce.row_mean_of_squares_qkgraph op. - β
reduce_row_mean_of_squares_shape: Computes the output shape for themo.reduce.row_mean_of_squaresgraph op. - β
top_k_shape: Computes the output shape for themo.top_kgraph op.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!