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

default_config_sm90

def default_config_sm90[a_type: DType, b_type: DType, c_type: DType, transpose_b: Bool, wgmma_shape: IndexList[Int(3)]]() -> MatmulConfig[a_type, b_type, c_type, transpose_b]

Returns the default SM90 matmul config for the given WGMMA shape.

Sets BM=128, BN from the WGMMA N dimension, BK to the maximum TMA-aligned value, 4 pipeline stages, 2 consumer warp groups, and no multicast.

Parameters:

  • ​a_type (DType): A-matrix (activations) element type; drives BK via TMA alignment.
  • ​b_type (DType): B-matrix (expert weights) element type.
  • ​c_type (DType): Output element type.
  • ​transpose_b (Bool): Whether B is stored transposed.
  • ​wgmma_shape (IndexList[Int(3)]): WGMMA instruction shape (M, N, K); N sets the block tile BN.

Returns:

MatmulConfig[a_type, b_type, c_type, transpose_b]: A MatmulConfig suitable for use as the default grouped matmul config.

Was this page helpful?