4 ms·
Most GPUs run threads in groups of 16 or more, with one instruction pointer shared by all of the threads in a single group. So if some threads need to take an
by sspiff 3y ago
Most GPUs run threads in groups of 16 or more, with one instruction pointer shared by all of the threads in a single group.
So if some threads need to take an IF-branch, and some need to take an ELSE-branch, both paths are executed in sequence, with all threads in the group executing in lock-step, and a per-thread mask disabling the effects of the instructions that aren't needed for each specific thread.
If you do this enough times, with sufficiently complicated branching, you'll quickly negate any efficiency gain you get from the massive parallelism.
- trashtester 3y agoThat's kind of like hitting a tree with a chainsaw, and complain it's a bad axe.
- raincole 3y agoNo one is complaining about anything. It's a brief explanation for a simple fact.
- trashtester 3y agoFair enough.