logoalt Hacker News

adrian_b • today at 10:43 PM • 0 replies • view on HN

In the early years of CUDA and GPGPU, NVIDIA published many papers full of lies, claiming that GPUs are typically 100 times faster than a CPU.

All those papers contained bad benchmarks, where an optimized GPU program was compared with a naive CPU program that used only a small fraction of the computational throughput of the CPU.

In reality, it is far easier to write a CPU program that reaches a great percentage of the maximum theoretical throughput, than to write a GPU program that reaches a similar percentage of its maximum theoretical throughput.

During more than a decade, for many generations of Intel Xeon CPUs and NVIDIA datacenter GPUs, the advantage in FP64 throughput per watt for GPUs has been of only 3 times, very far from the 100 times claimed by NVIDIA.

In recent years it has become more difficult to compare the performances of the GPUs with CPUs, due to the poor public documentation of the datacenter GPUs, which would need a hands-on access to measure the true performance.

Nonetheless, it seems that the performance per watt ratio has increased in the favor of GPUs, up to 4 times or even 5 times. The reason is the introduction in GPUs of the so-called "tensor units", more correctly named "matrix units", which in datacenter CPUs are also available for FP64. Recent Intel Xeons and the future AMD Zen 7 also have matrix units, but they are available only for ML/AI, not for FP32 or for FP64, hence the increased advantage for GPUs.

While GPUs always have an advantage in throughput per watt, the huge increase in the price of datacenter GPUs in recent years has ensured that the best performance per dollar for FP64 computations is achieved by desktop CPUs, not by GPUs (with the exception of Intel Battlemage GPUs, wich have an even better performance per dollar than any CPU, but which have a low absolute performance, lower than an AMD 9950X).

When comparing CPUs with GPUs, only the performance per watt and the performance per dollar matter, because either your purchasing budget or the available electricity supply will determine the maximum performance achievable, not the performance per CPU or per GPU.