Skip to content

AI, decoded

Why does AI run on GPUs?

Because training and running a neural network is mostly matrix math that splits into thousands of small calculations, and a GPU is built to run thousands of threads at once while a CPU is built to run a few threads as fast as possible. Gaming demand made that parallel hardware cheap; memory and networking now set the limits as models outgrow a single chip. Databricks' Carly Taylor told Chain of Thought that gaming drove down the cost of each matrix calculation on a GPU, and that today's data center GPUs are used primarily for generative AI.

· Chain of Thought

Level 5: Production agents · 5.4 Infrastructure choices

AI HardwareAI Infrastructure

  • 5 episodes
  • 5 guest clips
  • 3 common questions
  • 7 glossary terms

In detail

The work is parallel math

A neural network turns inputs into outputs through layers of multiplication and addition, mostly on large grids of numbers. Each output value can be computed largely independently of its neighbors, so the work splits into thousands of small, identical jobs.

That is the job a GPU is designed for. NVIDIA’s CUDA programming guide puts the difference plainly: a CPU is designed to run a serial sequence of operations as fast as possible and can run a few tens of these threads in parallel, while a GPU is designed to run thousands of threads in parallel, giving up single-thread speed for much greater total throughput. The GPU spends more of its transistors on arithmetic and fewer on caching and flow control. For matrix math, that trade pays off.

Gamers paid for the hardware first

The GPU began as fixed-function hardware for rendering 3D graphics. By 2003 parts of the graphics pipeline had become programmable, and in 2006 NVIDIA released CUDA so that any computation could use the GPU’s throughput, according to the same guide.

Carly Taylor, field CTO for gaming at Databricks, traces the economics. Players kept demanding more polygons and more realistic scenes, which pushed GPU makers to keep improving and drove the cost of each calculation down. Her suggested yardstick is the cost of a matrix calculation on a GPU, which kept falling. The data center GPUs that came out of that curve are now used mostly for generative AI, not for games.

One chip is no longer enough

Memory sets the first limit. A model has to fit in the memory of the chips serving it, which is why accelerator makers lead with memory capacity. AMD’s Anush Elangovan says the 288 GB on AMD’s 350 series puts a 500-billion-parameter model on a single GPU. That is AMD’s own framing, and the switching-cost explainer compares it with NVIDIA’s parts.

Training runs passed that limit long ago. Cisco’s Jeetu Patel describes the progression: models once fit in one GPU, then needed a server of four to eight GPUs, then a rack, then a row of racks. Now a single training run can need hundreds of thousands of GPUs. That can be more than one data center holds or more power than one site can draw, so separate buildings have to work as one cluster. His summary is that the GPU is the core asset and the network is the force multiplier. Without fast links between chips, the chips sit idle waiting for data.

GPUs are not the only option

An AI accelerator is any chip built to run this math faster or with less energy than a general-purpose processor. Google’s TPU is the best-known alternative. Google Cloud’s TPU architecture documentation describes it as an application-specific integrated circuit built for large matrix operations, using matrix-multiply units arranged as systolic arrays. Google’s 2017 paper on the first TPU reported that on its own production inference workloads, the chip averaged about 15 to 30 times the speed of a contemporary GPU or CPU, and 30 to 80 times the performance per watt. Those comparisons are against 2015-era hardware, not today’s GPUs.

The chip comes with its software. Paige Bailey of Google DeepMind says the JAX framework is loved partly because it uses TPUs so well and scales from one TPU to many, across data centers, which training Gemini requires. Logan Kilpatrick, then at Google DeepMind, credits TPUs with making long context practical to serve at scale. Both are describing their employer’s hardware.

Where it falls short

Not every part of an AI system belongs on an accelerator. AMD’s Sharon Zhou points out that an agent’s model calls run on GPUs, while many of the tools it calls run on CPUs, so the two loads have to be balanced. Google’s documentation makes a similar point from the other side: a program dominated by non-matrix operations, such as reshaping or concatenating data, will not keep the TPU’s matrix unit busy.

The hardware also does not decide the bill on its own. The energy cost of the chips is covered in how much electricity AI data centers use, and the software that keeps teams on one vendor is covered in the switching-cost explainer linked above.

Disclosure: Episode 47 is sponsored by Galileo, the Season 3 presenting sponsor; the read is at 49:58. Episodes 12, 26 and 28 were sponsored by Galileo, where Conor then worked; he introduces himself as Galileo’s Head of Developer Awareness at 0:05 in episode 28 and cites Galileo’s agent leaderboard at 1:08 in episode 12.

Why AI runs on GPUs: many small cores for parallel matrix math, then networks of chips Top left: a CPU drawn as a few large cores built to run a few tens of threads fast, with more of its area on caching and control. Top right: a GPU drawn as a dense grid of small cores built to run thousands of threads at once, which suits the matrix math inside a neural network. Bottom: the scale ladder Cisco's Jeetu Patel describes in episode 44, from one GPU to a server of four to eight GPUs, a rack, a row of racks, a data center and several data centers working as one cluster, under his line that the GPU is the core asset and the network is the force multiplier. A side note: TPUs are Google's application-specific chips built around a matrix unit. Many small cores, then many chips A neural network is mostly matrix math that splits into thousands of small, identical jobs. CPU cache and control A few tens of threads, each fast GPU Thousands of threads at once ANOTHER ROUTE: TPU Google’s application- specific chip, built around matrix-multiply units and programmed through the XLA compiler. WHEN ONE CHIP IS NOT ENOUGH · JEETU PATEL, EPISODE 44 1 GPU a serverof 4–8 GPUs a rack a row of racks a data center data centersas one cluster “GPU is the core asset for AI, and network is the force multiplier.” Without fast links between chips, the chips wait for data. CPU and GPU contrast from NVIDIA’s CUDA Programming Guide; TPU details from Google Cloud’s TPU documentation. Not to scale.
Parallel cores suit matrix math; networks of chips handle models that outgrow one. The scale ladder and quote are Jeetu Patel’s, from episode 44. The drawing is not to scale. Download the image

Hear it from the guest

“The best way to normalize it is, what does it cost to do some sort of matrix calculation?”
“GPU is the core asset for AI, and network is the force multiplier.”
“The only reason we're able to put long context into production, like at the scale that it is, is because of TPUs.”
Logan Kilpatrick, Google DeepMind EP 12 · around 25:46 · read the transcript
“And you can scale out not just to a single TPU”
Watch on YouTube
“Many of the tools they use are actually running on CPU.”

Quotes lightly edited to remove filler words.

Go deeper

Common questions

What is the difference between a GPU and a TPU?
A GPU is a general parallel processor that started in graphics and runs many kinds of workloads. A TPU is Google's application-specific chip for machine learning, built around a matrix multiply unit and programmed through the XLA compiler. Google offers TPUs through Google Cloud and runs its own Gemini models on them.
Can you run AI on a CPU?
Yes, for small models, light inference and much of the code around a model. An agent's tools, such as database queries and API calls, often run on CPUs while the model runs on accelerators. Training and serving large models at speed is where the GPU's parallelism pays off.
Why does NVIDIA dominate AI chips?
Hardware specifications are only part of it. Much of the switching cost lives in software: day-one support for new models, kernels and frameworks. The explainer on why it is hard to move AI workloads off NVIDIA covers that layer.

From the conversation

This explainer is drawn from these episodes — each carries its full transcript.

Concepts in this explainer

TPU (Tensor Processing Unit)AI acceleratorData CenterGenerative AINeural NetworkInferenceModel Parameters