3 ms·
The GPU is actually divided in group of units. The vendor use terms like wave or warp to descibe this unit. On such execution unit contains in the order of 32-6
by pierrebai 8y ago
The GPU is actually divided in group of units. The vendor use terms like wave or warp to descibe this unit. On such execution unit contains in the order of 32-64 ALU. When a branch is hit, if all unit do not go into the same branch, I believe they still all execute both branches. The ALU keepa a flag telling it which branch is live and the other branch basically execute as noop. So if a warp has a mix of branch taken and not taken, your execution time is proportional to the total cost of both branches added together. It's still faster than a CPU due to the huge number of ALU. (Plus, image coherence makes it that you will often hit only one branch in all ALU, which is optimized.)