3.4.2Research: Intra-Warp Divergent Path Management

Book pp. 47–52 · ~4 min read

  • multi-path execution
  • likely convergence points
  • thread frontiers

Where §3.4.1 merged threads across warps, this family keeps each warp intact and improves how its own divergent paths are handled — on two axes: run the paths concurrently (multi-path parallelism), and rejoin them earlier (better convergence).

Multi-path parallelism

After a divergent branch, a warp’s threads form warp splitswarp splitSubset of a warp's threads sharing a PC after divergence; the schedulable unit in stackless/multi-path designs.Glossary → — one per target. The baseline stack runs them one-at-a-time, but nothing about correctness requires that: threads in a warp only communicate explicitly (memory, barriers), so splits may freely interleave, just as different warps do. Interleaving doesn’t put more lanes to work — it recovers thread-level parallelism to hide memory latency. Watch the same divergent kernel (both paths contain a load) run both ways:

Single-path stack: stalls serialize (after Fig 3.18)cycle 0 / 7
ABBCCD
t0
t1
t2
t3

time →

All four threads load data[i] and evaluate the branch: lanes 0–1 go to B, lanes 2–3 to C.

One tick = one issue slot. Algorithm 3.1: X=data[i]; if(X>3) result=Y[i]*i (block B, has a load) else result=Z[i]+i (block C, has a load); block D reconverges. Baseline single-path SIMT stack (after Fig 3.18, top).
Multi-path execution: splits cover each other's stallscycle 0 / 5
ABCBCD
t0
t1
t2
t3

time →

Same divergence: lanes 0–1 → B, lanes 2–3 → C. But now BOTH warp-splits sit in a warp-split table, both eligible to issue.

One tick = one issue slot. Same code under multi-path execution (warp-split table): both splits are schedulable, so one split's stall is covered by the other's work (after Fig 3.18, bottom).

The proposals, in escalating generality:

  • Dynamic Warp Subdivision (Meng et al.): a warp-split table beside the stack; splits run concurrently. DWS even splits at memory divergence (some threads hit L1, some miss) — the hitters run ahead, effectively prefetching for the missers.
  • Dual-Path Execution (Rhu & Erez): cap it at two concurrent splits (the two at the TOS entry) — one extra PC + mask, a per-path scoreboard extension, and most of DWS’s benefit at a fraction of the complexity.
  • Multi-Path executionmulti-path executionLetting multiple warp-splits of one warp interleave (DWS, dual-path, MPM) to recover TLP during divergence.Glossary → (MPM, ElTantawy et al.): drop the stack entirely for a warp-split table + reconvergence table. Any split may issue until its PC equals its RPC; arrivals accumulate in the reconvergence entry, which retires into a merged split when everyone’s in. A careful scoreboard extension tracks dependences per split without duplicating the whole scoreboard per thread. (Sound familiar? Volta’s convergence barriers are an industrial cousin.)

Better convergence

The immediate post-dominator is the earliest guaranteed reconvergence point — but not always the earliest practical one. The classic case is a loop with a rare break: the IPDOM sits after the loop, yet in the common case threads meet again at the loop’s increment. (The book credits this observation for NVIDIA’s break instruction.) Likely convergence pointslikely convergence pointsExtra stack fields (LPC/LPos) capturing probable early reconvergence (e.g. before loop breaks) ahead of the IPDOM.Glossary → (Fung & Aamodt) extend each stack entry with two fields — LPC and LPos — and give divergent branches a speculative-but-safe early meeting point:

Likely convergence points on the break-loop (Fig 3.19)cycle 0 / 3

Step 1: Divergence at A — an LPC entry is born

Warp (threads 1,2,3,4) diverges at A's branch: thread 1 → B, threads 2–4 → C. The immediate post-dominator of A is F (the only guaranteed meeting point, because of the break). Three entries are pushed: a special LIKELY-convergence entry for E (empty mask, RPC=F), then the two path entries — each carrying LPC=E and LPos pointing at that special entry.

PC  RPC  LPC  LPos  Act.Thd.
F    --   --   --    1234
E    F    --   --    (empty)   ← LPC entry
B    F    E    1     1
C    F    E    1     234   ← TOS

One tick = one stack state from Fig 3.19. Code: while(i<K){ X=data[i]; /*A*/ if(X==0) result[i]=Y; /*B, 25%*/ else if(X==1) break; /*C→D, rare 2%*/ i++; /*E*/ } return result[i]; /*F*/ — F is the immediate post-dominator, but 96% of threads could reconverge earlier, at E.

Two stack-free alternatives round out the axis:

  • Thread frontiersthread frontiersPer-thread PCs + topologically sorted code; always run the lowest-PC threads so laggards catch up — no stack needed.Glossary → (Diamos et al.): the compiler sorts basic blocks topologically so control only flows “downward”; each thread keeps its own PC in the register file; the hardware always executes the warp’s lowest-PC threads (the frontier), so everyone ahead implicitly waits. Especially strong for unstructured control flow (multi-expression conditionals, exceptions), and with no fixed budget of convergence points — where the LCP stack fields cap out.
  • Opportunistic Early Reconvergence (OREC, in MPM): at a divergent branch, if a warp-split with the same PC and RPC already exists in the table, create an early reconvergence entry and merge with it — capturing unstructured-control-flow reconvergence without any compiler help.
DWSWarp-split table; splits interleave; splits on memory divergence tooSplits fragment SIMD width until reconvergence
Dual-PathExactly two concurrent splits (the TOS pair)Deeper splits wait their turn
Multi-Path (MPM)Split + reconvergence tables replace the stackPer-split dependence tracking (carefully, not per-thread duplication)
Likely convergence pointsLPC/LPos stack fields catch early meeting pointsFinite LPC slots per entry; needs analysis or profiles
Thread frontiersTopologically sorted code + run-lowest-PC rulePer-thread PCs in the register file; compiler support
Intra-warp path management at a glance. Click a row for the fine print.

Check yourself

  1. 1. What does multi-path execution improve — and what does it NOT improve?

  2. 2. Dual-Path Execution (DPS) deliberately limits a warp to two concurrent splits. Why?

  3. 3. What two structures replace the SIMT stack in Multi-Path execution (MPM)?

  4. 4. In the likely-convergence walkthrough, why does reconverging at E (not F) help this loop?

  5. 5. How do thread frontiers guarantee reconvergence without a stack?

0 / 5 correct · 5 unanswered