3 ms·
If you don’t have much data parallelism or have heavy conditional logic, you won't come close to 1GFlops on that CPU either. These 2 FLOPs/cycle are for SSE i.e
by Const-me 8y ago
If you don’t have much data parallelism or have heavy conditional logic, you won't come close to 1GFlops on that CPU either. These 2 FLOPs/cycle are for SSE i.e. 4-wide vector math without any conditions or branches.
Update: also, for other tasks, GPU flops are of higher quality than CPU.
VRAM bandwidth is ridiculous, much higher than system RAM, computations that are bound by RAM bandwidth will be much faster.
GPUs mask RAM latency with hardware multithreading, if your code is parallel and needs to access large amount of data randomly, a GPU will saturate these flops, a CPU will sleep most of the time waiting for data to arrive.
- glangdale 8y agoI think it's safe to say that these flops are different. One is not higher quality than the other. It's possible to conjure up examples where one is more fit for purpose (double-precision and irregular tasks on CPU), massive memory access for GPU. Both architectures have different types of cache which also complicates matters. An example that tortures the CPU (by being 'not much data parallelism or heavy conditional logic') will torture the GPU much worse, but this example will likely not really be "flop" dependent in any case.
- Const-me 8y agoThey're different but the differences are quite complex. CPUs can be faster for RAM bandwidth-bound code, if there's not that much data and it fits in caches at least L3, CPU cache bandwidth is very good. GPUs can be faster for heavily conditioned code. If it's the condition on RAM value, a CPU will stall or mispredict branches, both slow, a GPU will switch to another hardware thread which is very fast. Despite these differences, I find flops quite useful in practice to compare performance of different computers across architectures of generations. Computers compute, flops measure how fast they do.
- rayiner 8y ago> These 2 FLOPs/cycle are for SSE i.e. 4-wide vector math without any conditions or branches. Using double precision SSE scaler ops, the Pentium III could execute one addition and one multiplication per cycle. (The throughput was the same with vector math because the Pentium III only had 64-bit SSE units. So a 128-bit packed multiply and a 128-bit packed add, four double precision operations, executed over two cycles.)