IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Mojo module

mla_prefill_sparse

SM100 (B200) sparse MLA prefill kernel with BF16 KV cache.

K/V latents are read as BF16 via SWIZZLE_128B gather4 TMA and fed directly to the QK/SV MMA pipeline. The Q-load prologue, mma, cp_q_from_smem_to_tmem, _raw_indices_to_tma_rows and kv_valid_producer live in mla_prefill_sparse_utils.mojo.

Built with -D MLA_SPARSE_PREFILL_DECODE=1 (the _decode_core test twins), the entry point instead runs the sparse decode kernel through mla_sparse_attention_flat, so the prefill suites can check the decode kernel's prefill route. Production picks the route in the graph instead.

Structs​

Functions​

Was this page helpful?