How are CPUs and GPUs different in build? What tasks are handled by the GPU instead of CPU and what about the architecture makes it more suited to those tasks?

1.39K views

How are CPUs and GPUs different in build? What tasks are handled by the GPU instead of CPU and what about the architecture makes it more suited to those tasks?

In: Engineering

13 Answers

Anonymous 0 Comments

The basic unit of each is called a “datapath”. Given an instruction, a datapath will load data from memory, do a bit of math on it, write it back to memory. In both, the datapath can run multiple instructions in parallel, but in slight different ways. In a CPU, the goal is to optimize through put, to have the most instructions in a sequence completed. Imagine it a CPU trying to do multiple steps in a recipe at once to get it done as fast as possible. In a GPU, the datapath runs the same instruction over multiple sets of data at once. This lets it do complex mathematical operations, such as matrix multiplication, for large sets really quickly. Since most 3d-graphics and machine learning problems transform into a giant number of matrix multiplications, GPU tend to get used for these. CPU can do one specific thing that GPU’s are not good at: branching. When there is a choice that has to be made, the CPU decides which path to take.

You are viewing 1 out of 13 answers, click here to view all answers.