Live data from Hacker News

How GPUs Work

cs.virginia.edu

31–40 of 54 posts

Re: How GPUs Work

#31
post #30
post #28

Earlier quoted context omitted.

One should not forget another important thing: 1GFLOP in CPU is more expensive in terms of power than 1GFLOP in a GPU. So it's not only about chasing GFLOPs, in the mobile and embedded world it's also all about power.

But normalizing for power reduces the GPU advantage even more! Haswell for instance achieves about 5.3-5.8 GFLOP/W, compared to 24-28 GFLOP/W of Maxwell. That's less than a 5x theoretical computational gain.

Take a look at, say, Raspberry Pi: 24GFLOP for 1/2W. You won't get this for any number of mobile CPU cores.

Re: How GPUs Work

#32
post #31
post #30

Earlier quoted context omitted.

But normalizing for power reduces the GPU advantage even more! Haswell for instance achieves about 5.3-5.8 GFLOP/W, compared to 24-28 GFLOP/W of Maxwell. That's less than a 5x theoretical computational gain.

Take a look at, say, Raspberry Pi: 24GFLOP for 1/2W. You won't get this for any number of mobile CPU cores.

but that's GLES 2.0, which is significantly less flexible than the kinds of GPUs we're discussing here and is not even in the same ballpark as a CPU (and almost certainly significantly less strict in terms of floating point precision than a GLES 3 device).

Re: How GPUs Work

#33
post #31
post #30

Earlier quoted context omitted.

But normalizing for power reduces the GPU advantage even more! Haswell for instance achieves about 5.3-5.8 GFLOP/W, compared to 24-28 GFLOP/W of Maxwell. That's less than a 5x theoretical computational gain.

Take a look at, say, Raspberry Pi: 24GFLOP for 1/2W. You won't get this for any number of mobile CPU cores.

Mobile SoCs claimed numbers are hard to take at face value. For one, I'm 98% sure that's FP16 flops. For another, basically all SoCs in shipping devices throttle under load, so efficiency is hard to determine from unrelated peak performance and max power draw numbers.

Anyway, Cortex-A15 is capable of 8 flops per cycle per core which puts it pretty good in theoretical efficiency for its likely power draw at current clocks.

Re: How GPUs Work

#34
post #32
post #31

Earlier quoted context omitted.

Take a look at, say, Raspberry Pi: 24GFLOP for 1/2W. You won't get this for any number of mobile CPU cores.

but that's GLES 2.0, which is significantly less flexible than the kinds of GPUs we're discussing here and is not even in the same ballpark as a CPU (and almost certainly significantly less strict in terms of floating point precision than a GLES 3 device).

Yet, it's pretty sufficient for things like FFT.

Re: How GPUs Work

#35
post #33
post #31

Earlier quoted context omitted.

Take a look at, say, Raspberry Pi: 24GFLOP for 1/2W. You won't get this for any number of mobile CPU cores.

Mobile SoCs claimed numbers are hard to take at face value. For one, I'm 98% sure that's FP16 flops. For another, basically all SoCs in shipping devices throttle under load, so efficiency is hard to determine from unrelated peak performance and max power draw numbers. Anyway, Cortex-A15 is capable of 8 flops per cycle per core which puts it pretty good in theoretical efficiency for its likely power draw at current cl…

No, these are fair 32bit GFLOPs. No, VC4 do not throttle, power figures are given for the real max load.

And I never managed to get close to 8 ins per cycle on A15, but, for example, an FFT implementation on VC4 is pretty close to a theoretical performance limit. And a fully loaded 4-core A15 will draw far above 500mW anyway.

Re: How GPUs Work

#36
I'm currently taking an introductory course in computer graphics and we've been taught most of the things covered in this article, including the theory of the Phong lighting model and the graphics pipeline with different types of shaders. This is more or less a 25,000-foot overview of how computer graphics works and how the images on your screen came to be. It's highly interesting stuff and knowing a small amount of the math behind how it works really gives me an appreciation for the things I see in video games and 3D animations. I wish this article had gone further to explain how the GPU actually produces results in the highly-parallel way that this articles seems to skim over.

Re: How GPUs Work

#37
post #16
post #7

This overview, while a great start, doesn't really dive into the details of how modern GPUs work. Since 2007, many of the limitations that held GPUs back from being general-purpose computers have been removed (by relentless efforts of NVIDIA and to a lesser extent ATI/AMD, spurred in large part by NVIDIA's traction in the supercomputing space, for example http://en.wikipedia.org/wiki/Titan_%28supercomputer%29 ). My g…

What are you meaning by general-purpose here? Do you not have to use a different programming model anymore?

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.

Re: How GPUs Work

#38
post #35
post #33

Earlier quoted context omitted.

Mobile SoCs claimed numbers are hard to take at face value. For one, I'm 98% sure that's FP16 flops. For another, basically all SoCs in shipping devices throttle under load, so efficiency is hard to determine from unrelated peak performance and max power draw numbers. Anyway, Cortex-A15 is capable of 8 flops per cycle per core which puts it pretty good in theoretical efficiency for its likely power draw at current cl…

No, these are fair 32bit GFLOPs. No, VC4 do not throttle, power figures are given for the real max load. And I never managed to get close to 8 ins per cycle on A15, but, for example, an FFT implementation on VC4 is pretty close to a theoretical performance limit. And a fully loaded 4-core A15 will draw far above 500mW anyway.

It's one instruction per cycle that gets 8 flops. And what are you arguing even? Assuming its unthrottled FP32, that gives a quad-core A15 at 2GHz 7 watts to be over 5x less efficient.

Re: How GPUs Work

#39
post #38
post #35

Earlier quoted context omitted.

No, these are fair 32bit GFLOPs. No, VC4 do not throttle, power figures are given for the real max load. And I never managed to get close to 8 ins per cycle on A15, but, for example, an FFT implementation on VC4 is pretty close to a theoretical performance limit. And a fully loaded 4-core A15 will draw far above 500mW anyway.

It's one instruction per cycle that gets 8 flops. And what are you arguing even? Assuming its unthrottled FP32, that gives a quad-core A15 at 2GHz 7 watts to be over 5x less efficient.

I'm arguing that if all you have is 1W, you've got no other option but GPU.

Re: How GPUs Work

#40
One thing that's always put me off from studying GPUs in detail is the proprietariness of everything; with few exceptions (Intel being one of them recently, and surprisingly enough Broadcom for the RPi), there's no detailed datasheet or low-level programming information publicly available for modern GPUs, and what is available is still not all that complete. Contrast this with CPUs where a lot of them have full, highly-detailed information on everything from pinouts to how to get them to boot. People have made their own simple computer systems by wiring up a CPU on a circuit board with some support chips, but I don't think I've seen anything like this done for any reasonably recent or even ancient GPU.

(I know there are VGA reimplementations available, and the VGA is quite well-documented, but that's more of a timing controller/dumb frame-buffer than a real GPU.)

Post reply on HN