GPU vs. CPU for dummies (like me)

Simon Zagainov
unpack
Published in
3 min readNov 9, 2020

When I started the fast.ai course and was just learning what the heck the notebooks are (places where you can code, something like Colab and Gradient).
Our mentors were saying something like this: “Don’t use CPU, switch to GPU. Only if you use GPU, your model can work fast; the CPU approach can take hours when GPU can make it within some minutes.”
To me, it sounded like: “Please don’t touch this red bottom, because the plant will be blown away; touch the blue one instead, and all will be ok.”

If you are just starting and the phrases like the one above sound strange to you, let me try to explain in a way that I explained it to myself (dear experienced developers, please feel free to comment if you see that I’m making mistakes in this post).

The best explanation of CPU that I found:

The CPU (central processing unit) of a computer is often called the “brain” of a computer. It’s a collection of millions of transistors that can be manipulated to perform an awesome variety of calculations. A standard CPU has between one and four processing cores clocked anywhere from 1 to 4 GHz.
A CPU is powerful because it can do everything. If a computer is capable of accomplishing a task, it’s because the CPU can do it. Programmers achieve this through broad instruction sets and long feature lists shared by all CPUs.

So, let’s call your CPU a hero. Some kind of the smartest or the biggest badass in your office or team. Somebody who can manage the toughest tasks.

I decided to choose Elon Musk for this role (what a cliche, right?).
So, Musk is CPU.

CPU
Not this one
This one

What about GPU? Here is the explanation?

A GPU (graphics processing unit) is a specialized type of microprocessor. It’s optimized to display graphics and do very specific computational tasks. It runs at a lower clock speed than a CPU but has many times the number of processing cores.
You can almost think of a GPU as a specialized CPU that’s been built for a very specific purpose. Video rendering is all about doing simple mathematical operations over and over again, and that’s what a GPU is best at. A GPU will have thousands of processing cores running simultaneously. Each core, though slower than a CPU core, is tuned to be especially efficient at the basic mathematical operations required for video rendering. This massive parallelism is what makes GPUs capable of rendering the complex 3D graphics required by modern games.

In other words, GPU is an army of goofy creatures doing the same tasks, but there are a lot of them:

Your GPU

A quote from another website once again:

A GPU can only do a fraction of the many operations a CPU does, but it does so with incredible speed. A GPU will use hundreds of cores to make time-sensitive calculations for thousands of pixels at a time, making it possible to display complex 3D graphics. However, as fast as a GPU can go, it can only really perform “dumb” operations.

That is why the minions on your platform can perform quicker for the data analysis, as “GPUs are optimized for training artificial intelligence and deep learning models as they can process multiple computations simultaneously.”

Anyway, you will need them both in your data journey.

--

--

Simon Zagainov
unpack
Writer for

Write about Chinese digital products; CEO at ExpoPromoter (Shanghai); Forbes China 30U30