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

sched_barrier_exp_pairs

def sched_barrier_exp_pairs[pairs: Int, exp_cnt: Int, group: Int]()

Emits pairs schedule groups of shape [1 MFMA, exp_cnt TRANS].

TRANS variant of sched_barrier_pairs for exp2 / softmax transcendental work that issues on the AMDGPU TRANS unit (mask 0x400 per LLVM AMDGPU). Pair this with sched_barrier_pairs under the same sync_id to declare both interleavings within one cluster β€” LLVM orders the declarations as a single sequence (see the reference kernel.cpp:44-56 for the canonical pattern).

Parameters:

  • ​pairs (Int): Number of (MFMA, TRANS) groups to emit.
  • ​exp_cnt (Int): TRANS instructions per group.
  • ​group (Int): IGroupLP sync_id β€” must match the companion sched_barrier_pairs call's group for combined ordering.