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

get_scaling_kind

def get_scaling_kind[a_type: DType, scales_dtype: DType, SF_VECTOR_SIZE: Int]() -> UMMAKind

Selects the SM100 UMMA kind matching the operand and scale-factor types.

Maps the combination of operand dtype, scale-factor dtype, and scale-factor vector size to the corresponding UMMAKind used by SM100 block-scaled matmul instructions.

Parameters:

  • โ€‹a_type (DType): Operand element type (uint8 for MXFP4/NVFP4, float8_e4m3fn for MXFP8).
  • โ€‹scales_dtype (DType): Scale-factor element type.
  • โ€‹SF_VECTOR_SIZE (Int): Number of elements each scale factor covers.

Returns:

UMMAKind: The UMMAKind matching the provided type combination.

Was this page helpful?