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_configs_generic

def build_configs_generic[a_type: DType, b_type: DType, c_type: DType, transpose_b: Bool, M_start: Int, M_end: Int, ConfigFnType: def(Int) -> MatmulConfig[a_type, b_type, c_type, transpose_b] & ImplicitlyCopyable, config_fn: ConfigFnType]() -> Set[MatmulConfig[a_type, b_type, c_type, transpose_b]] where (eq ConfigFnType.a_type, a_type) where (eq ConfigFnType.b_type, b_type) where (eq ConfigFnType.c_type, c_type) where (eq ConfigFnType.transpose_b, transpose_b)

Builds the set of unique SM90 MatmulConfig instances over a user-supplied M range and config function.

Iterates M from M_start to M_end (exclusive), calls config_fn(m) for each, and deduplicates via set membership.

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).
  • ​M_start (Int): Starting value of the M sweep (inclusive).
  • ​M_end (Int): Ending value of the M sweep (exclusive).
  • ​ConfigFnType (def(Int) -> MatmulConfig[a_type, b_type, c_type, transpose_b] & ImplicitlyCopyable): The config function type (inferred).
  • ​config_fn (ConfigFnType): Function mapping an M value to a MatmulConfig.

Returns:

Set[MatmulConfig[a_type, b_type, c_type, transpose_b]]: A set of unique MatmulConfig values produced by config_fn over the M range.

Was this page helpful?