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_block_scaled_configs

def build_block_scaled_configs[a_type: DType, b_type: DType, c_type: DType, sfa_dtype: DType, sfb_dtype: DType, N: Int, K: Int, transpose_b: Bool = True]() -> Set[BlockScaledMatmulConfig[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b]]

Build a set of BlockScaledMatmulConfig instances by sweeping M from 8 to 8192.

Parameters:

  • ​a_type (DType): DType of the A (left) operand elements.
  • ​b_type (DType): DType of the B (right) operand elements.
  • ​c_type (DType): DType of the output matrix elements.
  • ​sfa_dtype (DType): DType of the A operand block scaling factors.
  • ​sfb_dtype (DType): DType of the B operand block scaling factors.
  • ​N (Int): The N dimension (output columns) of the matmul.
  • ​K (Int): The K dimension (contraction axis) of the matmul.
  • ​transpose_b (Bool): Whether the B operand is stored transposed (defaults to True).

Returns:

Set[BlockScaledMatmulConfig[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b]]: A set of unique BlockScaledMatmulConfig instances covering the swept M range.

Was this page helpful?