4 ms·
What are you meaning by general-purpose here? Do you not have to use a different programming model anymore?
by mej10 12y ago
What are you meaning by general-purpose here? Do you not have to use a different programming model anymore?
- dantillberg 12y agoThe parent is referring to how CUDA's introduction enabled developers to write and compile C-ish code to run on a GPU, while previously programmers could take advantage of the power of GPUs for non-render computations by hacking the pixel shaders and such, bending the graphics hardware to do something it was not designed for. You still have to write your program in a very different way in order to run efficiently on GPUs as opposed to CPUs.
- mej10 12y agoThe comparison to a Xeon is what confused me. I didn't think such a development had taken place.
- m_mueller 12y agoI'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).