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
iglp
IGroupLP sched_group_barrier aggregate-pair helpers for AMD MHA.
Comptime-recursive expansions of the reference's sched_barrier_pairs<Pairs, VALU_CNT, Group> and sched_barrier_exp_pairs<...> C++ templates
(see the reference attn/gqa_causal/kernel.cpp:44-56).
These helpers prescribe IGroupLP groupings to LLVM's AMDGPU instruction
scheduler via the llvm.amdgcn.sched.group.barrier intrinsic. They were
defined identically across several attention kernels and pulled here to a
shared module: one place to fix as the language evolves, no duplication.
Current consumers: mha_prefill_v2, mla_prefill, mla_prefill_v2,
mla_components.
Per-kernel hint-pair parameters (which N, M for QK / PV / EXP cluster
types) are tuned via parameter sweep at the kernel. Only the helper
expansion logic is shared; the per-cluster (N, M) defaults belong with
each kernel (they're shape-dependent and kernel-specific).
Structsβ
- β
AMDIGLPStrategy: Preset strategy values for thellvm.amdgcn.iglp.optintrinsic.
Functionsβ
- β
sched_barrier_exp_pairs: Emitspairsschedule groups of shape[1 MFMA, exp_cnt TRANS]. - β
sched_barrier_pairs: Emitspairsschedule groups of shape[1 MFMA, valu_cnt VALU]. - β
sched_dsread_valu_pairs: Emitspairsschedule groups of shape[1 DS_READ, valu_cnt VALU].
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!