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_largeM_clustered

def swapAB_largeM_clustered[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 [129, 240] range with cluster=(2,1,1).

Pattern: - BN = 72 + ((m - 129) // 16) * 8 - Stages: 12 for m<=160, 10 for m<=224, 8 otherwise - cluster = (2,1,1), k_group_size = 2, 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 [129, 240].
  • ​pdl_level (PDLLevel): Programmatic dependent launch level for grid controls.

Returns:

MatmulConfig[a_type, b_type, c_type, transpose_b]

Was this page helpful?