3 ms·
GPUs aren't really optimized for data locality per se. They have really long pipelines to memory and are more about having as much as possible in flight at onc
by monocasa 8y ago
GPUs aren't really optimized for data locality per se. They have really long pipelines to memory and are more about having as much as possible in flight at once. So under ideal conditions it doesn't matter if a memory access doesn't hit the cache and takes hundreds of clock cycles if you have hundreds of clock cycles of work on other threads to do. You can just sort of rotate through them all as results come back.
What's more important is divergence, ie. being able to schedule threads that run the same way. A GPU amortizes the program counter (generally) and control logic across a bunch of threads, and if they diverge in their code flow, you end up wasting a bunch of resources on threads that are just masked off.