Re:Ryzen Threadripper Pro 3995WX Spotted
by imtringued on Friday July 10, 2020 @02:42AM
(#23788835)
GPUs can't run the same code you would have written on a CPU. If you had the choice between an equally performing CPU and GPU you would always use the CPU.
[ Parent
| on HN ]
Why? Isn't the CPU will cost more than GPU because of more general instruction set?
Not really: the CPU costs more and can handle more workloads because it has more complicated control flow.
These days, arithmetic is cheap and control flow is expensive. GPUs and SIMD achieve high throughput by tying a set of arithmetic units together with the same control flow. As soon as you get complicated data-dependent workflows - as soon as you put "if" in your code or a virtual method - the GPU starts getting less efficient.
It's very much a "train vs car" argument: a train can deliver a large number of execution units , provided they're all going to the same place, whereas a car can re-route far more easily.
"train vs car" argument - really nice analogy.