IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo package

builtin_kernels

Provides the graph compiler's built-in kernel registrations.

Each module binds graph op names (such as mo.matmul) to the open-source kernels in linalg, nn, comm, and related packages using the same @compiler.register mechanism available to custom ops, so these registrations double as worked examples of how kernels connect to MAX graphs.

Modules​

  • ​attention: Registers attention graph ops (MHA, MLA, fused QKV) and dispatches them to the nn.attention kernels.
  • ​conv: Registers convolution graph ops and dispatches them to the nn.conv kernels.
  • ​distributed: Registers distributed and multi-GPU collective graph ops backed by the comm and shmem kernels.
  • ​elementwise: Registers elementwise and unary/binary math graph ops.
  • ​ep: Expert Parallelism (EP) Communication Kernel.
  • ​gather_scatter: Registers gather, scatter, and indexed-access graph ops backed by the nn.gather_scatter kernels.
  • ​kernels: Registers core tensor graph ops (range, copy, reshape, and related utilities).
  • ​kv_cache: Registers KV-cache graph ops backed by the kv_cache and nn.kv_cache kernels.
  • ​linalg: Registers matmul-family graph ops (matmul, grouped, batched, and quantized variants) and dispatches them to the linalg kernels.
  • ​logprobs: Registers log-probability computation graph ops used by sampling pipelines.
  • ​mega_ffn: Graph-op binding for the fused MegaFFN MoE FFN composite op (NVFP4 + MXFP8).
  • ​msa: Graph-op bindings for the MiniMax-M3 block-sparse attention (MSA) kernels.
  • ​nan_check: NaN/Inf detection kernels for the max-debug.nan-check feature.
  • ​quantization: Registers quantization and dequantization graph ops backed by the quantization and linalg kernels.
  • ​reductions: Registers reduction graph ops (sum, mean, argmax, and related) over tensor axes.

Was this page helpful?