The short answer Watch
- CPU (Central Processing Unit): the main brain of every computer and phone. A few powerful cores that do any job, one step after another.
- GPU (Graphics Processing Unit): thousands of small, simple cores that do easy sums all at the same time. Made for games, now the engine of AI.
- TPU (Tensor Processing Unit): a chip Google designed only for AI maths, mostly multiplying big grids of numbers.
A kitchen example Watch
Think of a big Indian wedding kitchen. The CPU is the head chef: brilliant, can cook any dish, plan the menu and handle surprises, but has only two hands. The GPU is a team of a thousand helpers, each only rolling rotis, but all at once, so ten thousand rotis are ready in minutes. The TPU is a roti-making machine: it cannot cook dal or plan the menu, but for rotis it is the fastest of all.
What is a CPU? Watch
The CPU runs your operating system (Windows, Android, iOS), opens apps, checks passwords and makes decisions. A laptop CPU usually has between 4 and 24 cores; big server CPUs have around a hundred. Each core is very fast and smart, and can jump between very different tasks.
Weak point: it does work mostly one step after another. For AI, which needs billions of small sums, a few cores are not enough.
What is a GPU? Watch
A GPU was made to draw video game pictures. A screen has millions of pixels, and each one needs a similar small calculation, so a GPU has thousands of small cores working in parallel (at the same time). For example, the NVIDIA RTX 4090 gaming card has more than 16,000 cores.
Around 2012, researchers found that the maths of neural networks is the same kind of work: huge numbers of multiply-and-add steps that can all happen at once. AlexNet, the model that started the deep learning boom, was trained on two gaming GPUs. Today, NVIDIA GPUs such as the H100 train and run most AI models, helped by NVIDIA's CUDA software.
What is a TPU? Watch
Google built its own AI chip, the Tensor Processing Unit. It started using TPUs inside its data centres in 2015 and announced them in 2016. A "tensor" is just a grid of numbers. A TPU is an ASIC, a chip made for one job: its heart is a large grid of multiply-add cells, and numbers flow through it like water through pipes.
It cannot run Windows or a game, but for AI maths it is extremely fast and saves power. Google uses TPUs for Search, YouTube recommendations and its Gemini models, and rents them to others through Google Cloud. You can only use a TPU through Google's cloud; you cannot buy one for your PC.
Why AI maths needs so many cores Watch
Remember the AI neuron: multiply each input by a weight, then add. A big model does this billions of times for every word it writes. Each sum is easy; the trouble is the number of them. Ten thousand simple cores working together beat ten genius cores working one by one.
CPU vs GPU vs TPU in one table Watch
| CPU | GPU | TPU | |
|---|---|---|---|
| Full name | Central Processing Unit | Graphics Processing Unit | Tensor Processing Unit |
| Cores | a few, very powerful | thousands, small and simple | big grids of multiply-add cells |
| Works | step by step, any task | many small tasks at once | only AI matrix maths |
| Made by | Intel, AMD, Apple, Qualcomm, MediaTek | NVIDIA, AMD, Intel | Google only |
| AI use | small models, data loading | training and running most AI | Google's AI, cloud customers |
| Where you find it | every phone and laptop | gaming PCs, AI servers | Google Cloud data centres |
And the NPU in your phone? Watch
New phones and laptops also have an NPU (Neural Processing Unit), a small AI chip like a pocket TPU. Apple calls its version the Neural Engine. It runs small AI jobs on the device itself: face unlock, photo touch-ups, live captions and voice typing, without draining the battery or sending your data to the cloud.
Training vs using: which chip does what Watch
- Training a big model like a chatbot: thousands of GPUs or TPUs working together for weeks.
- Answering your prompt (inference): GPUs or TPUs in the company's data centre, a few seconds of work each.
- Small AI on your phone: the NPU, sometimes helped by the phone's GPU and CPU.
- Learning AI at home: your laptop CPU is fine for small models; use a free cloud GPU for anything bigger.
Try it yourself, free Watch
Open Google Colab (colab.research.google.com), sign in, then choose Runtime, Change runtime type, and pick a T4 GPU. Free GPUs and TPUs depend on availability and have time limits. Paste this code, which multiplies two big grids of numbers on the CPU and then on the GPU:
import time, torch
x = torch.rand(4000, 4000)
start = time.time(); x @ x
print('CPU:', round(time.time() - start, 3), 'seconds')
g = x.cuda(); g @ g; torch.cuda.synchronize() # warm up the GPU
start = time.time(); g @ g; torch.cuda.synchronize()
print('GPU:', round(time.time() - start, 3), 'seconds')
Run it. The GPU usually finishes many times faster than the CPU. That gap is why AI companies buy GPUs by the thousand.
Lesson learned Watch
A CPU has a few smart cores for any task, a GPU has thousands of simple cores doing sums at the same time, and a TPU is Google's chip built only for AI maths. AI needs billions of small sums, so GPUs and TPUs do the heavy work while the CPU manages.
Frequently asked questions
What is the main difference between a CPU and a GPU?
A CPU has a few powerful cores that do tasks one after another; a GPU has thousands of simpler cores that do many small calculations at the same time.
Why is a GPU used for AI?
Neural networks need billions of multiply-and-add steps that can run at the same time. A GPU's thousands of cores do them in parallel, so training is much faster than on a CPU.
What is a TPU?
A Tensor Processing Unit is a chip Google designed only for AI maths. Google uses it for its own AI and rents it through Google Cloud.
Is a TPU better than a GPU?
For large AI jobs built for it, a TPU can be faster and use less power. A GPU is more flexible: it also runs games and graphics and works with most AI software.
Do I need a GPU to use ChatGPT?
No. Chatbots run on the company's GPUs or TPUs in the cloud. You only need a GPU to train or run AI models on your own computer, and Google Colab gives a free one to learn with.