GPU vs CPU in Deep Learning

GPU vs CPU?

Deepak
2 min readJul 23, 2021

One of the most admired characteristics of a GPU is the ability to compute processes in parallel. This is the point where the concept of parallel computing kicks in. A CPU in general completes its task in a sequential manner. A CPU can be divided into cores and each core takes up one task at a time. Suppose if a CPU has 2 cores. Then two different task’s processes can run on these two cores thereby achieving multitasking.

But still, these processes execute in a serial fashion.

What’s the Difference ?

This doesn’t mean that CPUs aren’t good enough. In fact, CPUs are really good at handling different tasks related to different operations like handling operating systems, handing spreadsheets, playing HD videos, extracting large zip files, all at the same time. These are some things that a GPU simply cannot do.

As discussed previously a CPU is divided into multiple cores so that they can take on multiple tasks at the same time, whereas GPU will be having hundreds and thousands of cores, all of which are dedicated towards a single task. These are simple computations that are performed more frequently and are independent of each other. And both store frequently required data into there respective cache memory, thereby following the principle of ‘locality reference’.

This put less load not CPU,high performance and and also neglectable change in accuracy of model.

Neural networks are said to be embarrassingly parallel, which means computations in neural networks can be executed in parallel easily and they are independent of each other.

Hope you now understand which is beneficial for Deep Learning…Irrespective of CPU or GPU, the more the number of cores the better. That's why GPU perform better because it has more number of cores than CPU

Thank You for reading till end 😀

--

--

Deepak
Deepak

Written by Deepak

RHEL8 | AWS | Ansible | Docker| K8s | Jenkins

No responses yet