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

swapAB_midM_linear

def swapAB_midM_linear[a_type: DType, b_type: DType, c_type: DType, transpose_b: Bool = True](m: Int, pdl_level: PDLLevel) -> MatmulConfig[a_type, b_type, c_type, transpose_b]

Config for m in [65, 128] range with linear BN pattern.

Pattern: - BN = 40 + ((m - 65) // 16) * 8 - stages = 8, cluster = (1,1,1), swapAB = True

Parameters:

  • ​a_type (DType): Element DType of the A input matrix.
  • ​b_type (DType): Element DType of the B input matrix.
  • ​c_type (DType): Element DType of the output C matrix.
  • ​transpose_b (Bool): Whether B is stored transposed (K-major layout) (defaults to True).

Args:

  • ​m (Int): The M dimension of the matmul, in the range [65, 128].
  • ​pdl_level (PDLLevel): Programmatic dependent launch level for grid controls.

Returns:

MatmulConfig[a_type, b_type, c_type, transpose_b]

Was this page helpful?