← 🧵 Computer Science

🧵 GPU Warp Scheduling & SIMD Branch Divergence

Active Ratio:
Cycles Vs Ideal:
Drag — rotate · Scroll — zoom

🧵 GPU Warp Scheduling & SIMD Branch Divergence

The simulation shows a warp of 32 threads hitting an if/else branch, visualizing the active lane mask during each serialized branch phase and the wasted, masked-off lane-cycles that result from divergence.

🔬 What It Demonstrates

The simulation shows a warp of 32 threads hitting an if/else branch, visualizing the active lane mask during each serialized branch phase and the wasted, masked-off lane-cycles that result from divergence.

🎮 How to Use

Adjust the fraction of threads taking each branch path and the relative cost of each branch, then step through execution to see the active mask change and the total serialized cycle count compared to a fully convergent warp.

💡 Did You Know?

A warp where just one thread out of 32 needs an expensive branch still forces all 32 lanes to wait through that entire branch, since the hardware cannot skip ahead for the other 31 idle lanes.