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
linalg
Registers matmul-family graph ops (matmul, grouped, batched, and quantized variants) and dispatches them to the linalg kernels.
comptime valuesβ
loggerβ
comptime logger = Logger(stdout, prefix=String(""), source_location=False)
Structsβ
- β
BatchMatmul: Registers themo.batch_matmulgraph op with the graph compiler. - β
FusedMatmulAdd: Registers themo.composite.matmul_addgraph op with the graph compiler. - β
LayoutTransformMatmulKN2KNkni: Registers thelayout_transform_KN_to_KNknigraph op with the graph compiler. - β
LayoutTransformMatmulNK2KNkni: Registers thelayout_transform_NK_to_KNknigraph op with the graph compiler. - β
LinalgBandPart: Registers themo.linalg.band_partgraph op with the graph compiler. - β
Matmul: Registers themo.matmulgraph op with the graph compiler. - β
MatmulDynamicScaledFloat8: Registers themo.matmul_dynamic_scaled_fp8graph op with the graph compiler. - β
MatmulFusedPartialRMSNorm: Fuses GEMV (M=1 matmul) with partial RMS normalization. - β
MatmulStaticScaledFloat8: Registers themo.matmul_static_scaled_float8graph op with the graph compiler. - β
MatmulSwiGLU: Fused GEMM+SwiGLU on SM100 for BF16 inputs. - β
MatmulSwiGLUBias: Fused GEMM+SwiGLU+bias on SM100 for BF16 inputs. - β
MergeRaggedTensors: Registers themo.merge_ragged_tensorsgraph op with the graph compiler. - β
PackMatmulBShapeFunc: Registers thepack_matmul_b_shape_funcgraph op with the graph compiler. - β
Struct_batched_matmul_dynamic_scaled_fp8: Registers themo.batched.matmul.dynamic.scaled.fp8graph op with the graph compiler. - β
Struct_grouped_matmul_block_scaled: MOGG wrapper for grouped block-scaled matrix multiplication. - β
Struct_grouped_matmul_block_scaled_mxfp4: MOGG wrapper for grouped block-scaled matrix multiplication. - β
Struct_grouped_matmul_dynamic_scaled_fp8: Registers themo.grouped.matmul.dynamic.scaled.fp8graph op with the graph compiler. - β
Struct_grouped_matmul_ragged: Registers themo.grouped.matmul.raggedgraph op with the graph compiler. - β
Struct_grouped_matmul_rowwise_dynamic_scaled_fp8: MOGG wrapper for grouped (ragged MoE) rowwise/per-token scaled FP8 matmul. - β
Struct_grouped_matmul_swiglu_nvfp4: MOGG wrapper for fused grouped NVFP4 matmul + SwiGLU + NVFP4 quant. - β
Struct_lora_sgmv_qkv_expand_ragged: - β
Struct_lora_sgmv_qkv_shrink_ragged: Registers themo.lora_sgmv.qkv_shrink.raggedgraph op with the graph compiler. - β
Struct_lora_sgmv_ragged: Registers themo.lora_sgmv.raggedgraph op with the graph compiler. - β
Struct_matmul_dynamic_block_scaled: Registers themo.matmul.dynamic.block.scaledgraph op with the graph compiler. - β
Struct_matmul_dynamic_block_scaled_mxfp4: Registers themo.matmul.dynamic.block.scaled.mxfp4graph op with the graph compiler. - β
Struct_matmul_int8_w8a8_apple: Apple M5 int8 W8A8 matmul (no bias):out = dequant(quant(a) @ b^T). - β
Struct_matmul_int8_w8a8_apple_bias: Apple M5 int8 W8A8 matmul WITH per-output-channel bias. - β
Struct_matmul_mxfp4_dequant_fp8: Registers themo.matmul.mxfp4.dequant.fp8graph op with the graph compiler. - β
Struct_matmul_weight_only_block_scaled_apple: Apple M5 weight-only NVFP4 (W4A16) matmul:out = a @ dequant(b)^T. - β
Struct_matmul_weight_only_scaled_float8_apple: Apple M5 weight-only FP8 (W8A16) matmul:out = a @ dequant(b)^T. - β
Struct_router_gate_mixed_gemv: MOGG wrapper for the mixed-input router-gate GEMV.
Functionsβ
- β
batch_matmul_shape: Computes the output shape for themo.batch_matmulgraph op. - β
composite_matmul_fused_partial_rms_norm_shape: Computes the output shape for themo.composite.matmul_fused_partial_rms_normgraph op. - β
pack_matmul_b_shape_func_shape: Computes the output shape for thepack_matmul_b_shape_funcgraph op.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!