4 ms·
This is how I've understood it - and I'm clueless at both processor architecture and deep learning, so assume I'm wrong. If you ask "why are GPUs better suited
by blowski 3y ago
This is how I've understood it - and I'm clueless at both processor architecture and deep learning, so assume I'm wrong.
If you ask "why are GPUs better suited than CPU s?" then it's because CPUs are more general purpose, and need to handle branching, task-switching, IO.
For rendering graphics, GPUs need to apply the same set of instructions to multiple pixels and vectors, so they use a "single instruction, multiple threads" architecture. They apply the same operation to different data, which allows them to do this in parallel, so they can have a lot of ALUs.
And this SIMT architecture is also really good for matrix multiplication. Many of the features that make CPUs fast - caching, pipelining - wouldn't work with SIMT.
- SilverBirch 3y agoJust a nit pick, generally we refer to it as SIMD - Single instruction multiple data[1]. In reality today most CPUs have vector processing instructions and GPUs have lots of groups of SIMD units so both CPUs and GPUs are MIMD, GPUs are just much further along on the Instruction:Data ratio. [1]:https://en.wikipedia.org/wiki/Flynn%27s_taxonomy https://en.wikipedia.org/wiki/Flynn%27s_taxonomy
- dragontamer 3y agoI'm pretty sure modern GPUs are pipelined and cached. The important tidbit is that CPUs find parallelism where the programmers didn't specify any. CPUs are "out of order" machines, spending a fair amount of energy and internal storage (the ROB / reorder buffer) to execute out-of-order, and then place all the results back in order before the programmer notices. GPUs, instead of being configured to find parallelism, innately assume that the programmer laid out parallelism for it ahead of time. GPUs can only work with a massively parallel language (OpenCL, DirectX HLSL, or CUDA) specifying thousands of parallel work units per line.