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

linalg

Provides CPU and GPU implementations of linear algebra functions.

Packages

  • arch: Provides architecture specific utility functions.
  • matmul: Provides the backend implementation for matmuls.

Modules

  • accumulate: Provides register-file accumulator structures used by the matmul inner loop.
  • bmm: Provides batched matrix multiplication (BMM) for CPU and GPU targets.
  • fp4_quantization: Provides FP4 quantization kernels for dynamic block-scaled and MXFP4 formats.
  • fp4_utils: Provides low-level FP4 encode/decode utilities and scale-factor helpers.
  • fp8_quantization: Provides FP8 quantization kernels supporting static, dynamic, and blockwise scaling.
  • gemv: Provides general matrix-vector (GEMV) and general vector-matrix (GEVM) kernels for CPU and GPU.
  • grouped_matmul: Provides grouped matrix multiplication kernels for CPU, AMD, and NVIDIA GPU targets.
  • grouped_matmul_block_scaled_dispatch: General dispatch for grouped block-scaled matmul.
  • grouped_matmul_sm100: Provides warp-specialized persistent grouped GEMM kernels for SM100 (B200) GPUs.
  • grouped_matmul_sm100_1d1d: Provides block-scaled grouped GEMM for 1D×1D scale layouts on SM100 (B200) GPUs.
  • grouped_matmul_sm100_blockwise_fp8: Provides blockwise-scaled FP8 grouped GEMM kernels for SM100 (B200) GPUs.
  • grouped_matmul_tile_scheduler: Provides a persistent tile scheduler for grouped matmul GPU kernels.
  • lora: Provides LoRA (Low-Rank Adaptation) grouped matmul kernels for SM100 GPUs.
  • matrix_band_part: The module implements matrix band part functions.
  • mxfp4_dequant: MXFP4 dequantization kernel for H100 (SM90).
  • mxfp4_matmul_sm90: MXFP4 matmul on H100 (SM90) via dequant-to-FP8 + FP8 GEMM.
  • packing: Provides matrix packing routines that reorder B tiles into cache-friendly layouts for matmul.
  • qr_factorization: Provides QR factorization of matrices using Householder reflections.
  • structuring: Provides structured sparsity utilities for scatter-gather operations on GPU.
  • transpose: The module implements Transpose functions.
  • utils: Provides shared CPU matmul utilities including tile-consumer traits, kernel shape selection, and partial SIMD load/store helpers.
  • utils_gpu: Provides GPU matmul configuration selection, block-swizzling, and Hilbert-curve tile-ordering utilities.