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

matmul_dynamic_block_scaled_mxfp4

def matmul_dynamic_block_scaled_mxfp4[out_dtype: DType](c: TileTensor[out_dtype, Storage=c.Storage, address_space=c.address_space, linear_idx_type=c.linear_idx_type], a: TileTensor[DType.uint8, Storage=a.Storage, address_space=a.address_space, linear_idx_type=a.linear_idx_type], b: TileTensor[DType.uint8, Storage=b.Storage, address_space=b.address_space, linear_idx_type=b.linear_idx_type], a_scales: TileTensor[DType.float8_e8m0fnu, Storage=a_scales.Storage, address_space=a_scales.address_space, linear_idx_type=a_scales.linear_idx_type], b_scales: TileTensor[DType.float8_e8m0fnu, Storage=b_scales.Storage, address_space=b_scales.address_space, linear_idx_type=b_scales.linear_idx_type], ctx: DeviceContext)

Launches the AMD CDNA4 MXFP4 block-scaled matmul kernel.

Selects a BLOCK_N of 16 when the N dimension is divisible by 16, otherwise falls back to 1, and enqueues matmul_dynamic_block_scaled_mxfp4_kernel over a 2D grid.

Parameters:

  • out_dtype (DType): Element type of the output matrix c.

Was this page helpful?