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 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 @extensibility.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.
  • ​bundled: Registers the per-device (mo.bundled.*) collective graph ops backed by the comm 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.
  • ​gated_residual_rms_norm: Registers Muse Spark's gated residual boundary as gated_residual_rms_norm.
  • ​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.
  • ​monoids: Concrete reduction monoids conforming to algorithm.reduce_op.ReduceOp.
  • ​mtp: Graph-op bindings for multi-token-prediction draft layers.
  • ​nan_check: NaN/Inf detection kernels for the max-debug.nan-check feature.
  • ​qk_rms_norm_rope_store: Muse Spark's attention prologue and epilogue norms as graph ops.
  • ​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.
  • ​routed_rows_rms_norm: An input-scaled RMS norm over the routed rows of an EP expert-output buffer.
  • ​rowwise_normalization: Row-based normalization kernels (rms_norm, layer_norm and fused variants) built on the algorithm.rowwise scaffolder and the builtin_kernels.monoids monoid library.
  • ​rowwise_reductions: Row-based row-wise reductions (free-form body layer).
  • ​short_conv_ring: Registers the ring-state short convolution graph ops; see nn.short_conv_ring.

Was this page helpful?