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 module

tuning_configs

Tuning configurations for fused GEMM+SwiGLU on SM100.

Each entry covers an M range [M, M_end) for a fixed (N, K) shape. N is the full pre-SwiGLU output width, i.e. b.shape[0] for weight b[N, K].

register_swiglu=True selects the register→GMEM path: registers → FP32 SwiGLU → BF16 GMEM stores. No extra SMEM cost, relaxed alignment. Benchmarked on B200 to be faster than SMEM→TMA across all measured M values (19-23% faster at small M, 3-7% faster at large M).

register_swiglu=False selects the SMEM+TMA path: registers → FP32 SwiGLU → BF16 SMEM → TMA store. Needs extra SMEM for the double-buffered half-N output tile (see swiglu_extra_fixed_smem in the dispatcher). Not used by any current entry; kept for future shapes where the SMEM+TMA path may win (e.g. very large N where the output tile is small relative to SMEM and TMA bulk bandwidth dominates).

Structs

Was this page helpful?