3 ms·
I'd sum it up like this: GPGPU can be made to run any computational code - this doesn't mean that it's necessarily faster though (otherwise we could just forget
by m_mueller 12y ago
I'd sum it up like this: GPGPU can be made to run any computational code - this doesn't mean that it's necessarily faster though (otherwise we could just forget about CPUs couldn't we?). A few things need to be true in order for GPUs to execute something with a speedup compared to CPU:
1) Code needs to have at least 1k, better 10k+ parallel 'threads'.
2) These threads should be largely data parallel (branching is possible but hurts performance more significantly than on CPU).
3) Registers and memory per thread are limited, around 30-60 registers and 400-800k memory are the limits to achieve a reasonable saturation. If you disregard this, spilling of memory will occur (or the memory will just run out, there's no swapping so it will just crash).
4) Because of (1) and (3), GPUs like so called 'tight loops', i.e. many parallel but smallish kernels.
- sklogic 12y ago2) Some GPUs do not penalise branching 3) Some GPUs have MMUs (and share their paging with the host CPUs)
- m_mueller 12y ago2) You mean Xeon Phi / Knights Corner? Yes, I wouldn't call these GPUs though, they have to be regarded a bit differently. They have quite a few problems in other areas btw., so far the results of theses systems are not very promising. 3) By MMUs do you mean unified memory? Well yes, but for now this is so slow that you don't really want to use it. This might change on Power systems with nvlink and for Knights Landing generation Intel accelerators, but that's still in the future / not publicly available.
- sklogic 12y agoI was rather talking about some of the mobile GPUs. It would have been highly inefficient to have a non-uniform memory in the mobile devices (although a uniform memory do not always imply an MMU on a GPU side, it's a totally different story).