Skip to main content

Mojo function

sched_dsread_valu_pairs

sched_dsread_valu_pairs[pairs: Int, valu_cnt: Int, group: Int]()

Emits pairs schedule groups of shape [1 DS_READ, valu_cnt VALU].

DS_READ variant of sched_barrier_pairs for clusters that have NO MFMAs but want to interleave LDS-reads with VALU work — typically V-load + causal-mask clusters (HK MHA C5 / EPI_C5 / EPI_C9). The interleave hides the v_cmp→v_cndmask wait state (5 cycles, gated by s_nop 1 if not filled) behind useful ds_read_b64_tr_b16 work.

Same sync_id rule as sched_barrier_pairs: pick a fresh group distinct from MFMA/VALU/TRANS pair sequences in other clusters.

Parameters:

  • pairs (Int): Number of (DS_READ, VALU) groups to emit.
  • valu_cnt (Int): VALU instructions per group (typically 2 for one cmp+cndmask pair per ds_read).
  • group (Int): IGroupLP sync_id.