Re:Intel's New Low: Commissioning Misleading Core I9-9900K B...
by dragontamer on Tuesday October 09, 2018 @12:40PM
(#18177456)
Depends on how many if-statements / branches your code takes.
If you have simple if-statements and all branches are grouped together to be SIMD'd easily... then yeah. GPU threads kind of are like normal CPU threads.
But as soon as you have a serious degree of thread-divergence, your performance tanks. That's why things like Chess engines (which ARE parallel problems at heart), execute poorly on GPUs. Because even though it is massively parallel, chess has too many if-statements and can't extend to SIMD very easily.
--------
Raytracing algorithms are funny: they group rays together so that the GPU can SIMD over them more easily. But without the "re-grouping" step, its bad performance.
Ex: A bunch of rays start at the camera. Some might hit a diffuse surface like wood... some might hit a subsurface-scattering surface like skin, and others might hit a metalic surface. GPU-raytracing algorithms then save off all the rays, and then processes all "diffuse" rays together, to minimize divergence.
You can't just follow a singular ray in raytracing on a GPU. You gotta re-group to SIMD units for maximum performance.
If you have simple if-statements and all branches are grouped together to be SIMD'd easily... then yeah. GPU threads kind of are like normal CPU threads.
But as soon as you have a serious degree of thread-divergence, your performance tanks. That's why things like Chess engines (which ARE parallel problems at heart), execute poorly on GPUs. Because even though it is massively parallel, chess has too many if-statements and can't extend to SIMD very easily.
--------
Raytracing algorithms are funny: they group rays together so that the GPU can SIMD over them more easily. But without the "re-grouping" step, its bad performance.
Ex: A bunch of rays start at the camera. Some might hit a diffuse surface like wood... some might hit a subsurface-scattering surface like skin, and others might hit a metalic surface. GPU-raytracing algorithms then save off all the rays, and then processes all "diffuse" rays together, to minimize divergence.
You can't just follow a singular ray in raytracing on a GPU. You gotta re-group to SIMD units for maximum performance.