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): ElementDTypeof the A input matrix. - βb_type (
DType): ElementDTypeof the B input matrix. - βc_type (
DType): ElementDTypeof the output C matrix. - βtranspose_b (
Bool): WhetherBis 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 aMatmulConfig.
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?
Thank you! We'll create more content like this.
Thank you for helping us improve!