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 module
grouped_matmul
Provides grouped matrix multiplication kernels for CPU, AMD, and NVIDIA GPU targets.
Functionsβ
- β
dispatch_amd_matmul_by_block_shape: Dispatches to the best kernel configuration based on runtime M dimension. - β
grouped_matmul: TileTensor implementation ofgrouped_matmul. - β
grouped_matmul_amd: Launches the AMD grouped matmul kernel, selecting the best block-tile configuration for the runtime M dimension viadispatch_amd_matmul_by_block_shape. - β
grouped_matmul_amd_kernel_launcher: Computes the AMD GPU grouped matmul by dispatching per-expert tiles throughAMDMatmul, with separate zero-fill handling for inactive (expert_id == -1) blocks. - β
grouped_matmul_kernel_sm100: Computes the SM100 (Blackwell) grouped matmul using TMA async copies into shared memory and tcgen05 tensor-memory MMA accumulation, with an optional elementwise epilogue. - β
grouped_matmul_rowwise_dynamic_scaled_fp8: Grouped (ragged MoE) FP8 matmul with rowwise weight + per-token act scales. - β
grouped_matmul_rowwise_scaled_fp8_kernel: Computes the naive grouped FP8 matmul with rowwise weight scales and per-token activation scales, accumulating in fp32 and applying a single post-reduction scale. - β
grouped_matmul_sm100: Launches the SM100 grouped matmul kernel with TMA descriptors for ragged MoE matrix multiplication on Blackwell GPUs. - β
grouped_matmul_vendor: TileTensor primary implementation ofgrouped_matmul_vendor. - β
naive_epilogue: Launches thenaive_epilogue_kernelto apply an elementwise epilogue function across the output tensorc. - β
naive_epilogue_kernel: Applies an elementwise epilogue function to each SIMD-vectorized element of the output tensorc. - β
naive_grouped_matmul: TileTensor primary implementation ofnaive_grouped_matmul. - β
naive_grouped_matmul_kernel: Computes one element per thread of the grouped matmul productC[a_offsets[z]:a_offsets[z+1], :] = A[...] @ B[expert_ids[z], :, :].Tfor each active expertz, with an optional elementwise epilogue.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!