Skip to main content

Mojo function

sched_barrier_exp_pairs

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 HipKittens 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.