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 module

mha_decode_partition_heuristic

Split-K partition-count heuristics for MHA and MLA decode kernels.

Exposes per-backend functions that decide how many partitions the decode split-K loop should run across, plus num_keys-independent upper bounds used to launch graph-stable decode grids whose extra partitions early-return in the kernel. CUDA uses a simple SM-fill target clamped to the single-warp reducer limit; HIP (MI355X) uses a wave-aligned formula tuned for both MHA and MLA decode shapes.

Functions​

Was this page helpful?