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 function

build_sm100_matmul_configs

def build_sm100_matmul_configs[a_type: DType, b_type: DType, c_type: DType, N: Int, K: Int, transpose_b: Bool = True, has_bias: Bool = False]() -> Set[FusedSwiGLUMatmulConfig[a_type, b_type, c_type, transpose_b]]

Build FusedSwiGLUMatmulConfigs for SM100 fused GEMM+SwiGLU.

For (N, K) shapes covered by the SwiGLU tuning table each entry's register_swiglu flag selects the epilogue path:

  • True (register→GMEM): no extra SMEM overhead.
  • False (SMEM→TMA): pipeline stages reduced for the double-buffered half-output tiles.

For untuned (N, K) shapes returns an empty set; dispatch falls back to its safety-net config.

Parameters:

  • a_type (DType): DType of the A operand elements.
  • b_type (DType): DType of the B operand elements.
  • c_type (DType): DType of the C output elements.
  • N (Int): Number of columns in the output C matrix.
  • K (Int): Contraction dimension of the GEMM (shared inner size of A and B).
  • transpose_b (Bool): Whether the B operand is stored transposed (defaults to True).
  • has_bias (Bool): Whether a bias vector is applied in the epilogue (defaults to False).

Returns:

Set[FusedSwiGLUMatmulConfig[a_type, b_type, c_type, transpose_b]]

Was this page helpful?