Skip to main content

Accelerated Compute

Exam guide§2.1

The performance-optimized, purpose-built hardware behind efficient AI has three core components: networking, storage, and compute. Google packages them as the AI Hypercomputer - a stack that pairs that hardware with open software and flexible ways to pay for it.

AI Hypercomputer stack
AI Hypercomputer stack - flexible consumption over open software over performance-optimized hardware (compute, storage, networking).

The rest of this page breaks down the compute layer: the three accelerator types, how each one works, and why architecture - not just clock speed - decides which is fastest for a given workload.

CPU: central processing

Central processing units (CPUs) are not specialized for the matrix multiplications at the heart of deep learning the way GPUs and TPUs are, but they still earn a place in AI workloads. As general-purpose processors they handle data preprocessing, control flow in ML programs, and less compute-intensive inference - especially low-cost inference scenarios.

How a CPU works. At its core a CPU is a general-purpose processor built on the von Neumann architecture: it works with software and memory sequentially - load values from memory, perform a calculation, store the result back to memory.

How a CPU works
The von Neumann bottleneck
The von Neumann bottleneck - data funnels through a narrow bus between the memory array and the CPU.
  • Strength - flexibility. A CPU can execute any kind of software for a huge range of applications, from word processing to controlling rocket engines, processing bank transactions, or classifying images with a neural network.
  • Limitation - the von Neumann bottleneck. Sequential memory access is slow relative to the calculation itself, which caps overall throughput.
GotchaThe von Neumann bottleneck

A CPU spends much of its time moving data between memory and the processor, and that memory access is far slower than the arithmetic. This sequential memory-access bottleneck - not raw ALU speed - is what limits a CPU on the large, repetitive matrix math of deep learning.

GPU: parallel processing

Graphics processing units (GPUs) were built to render game graphics, but their real superpower is doing a massive number of calculations at once. That makes them ideal for the heavy lifting in deep learning, especially the complex matrix multiplications.

How a GPU works. A GPU reaches high throughput by packing thousands of arithmetic logic units (ALUs) into one processor - modern GPUs commonly have tens of thousands - so it can run thousands of multiplications and additions simultaneously. Compare the chip real estate: a CPU spends most of its area on control logic and cache with a few large ALUs, while a GPU is almost all ALUs.

How a GPU works
CPU vs GPU chip layout
CPU vs GPU chip layout - the CPU has a few large ALUs plus large control logic and cache; the GPU is a dense grid of many small ALUs.
  • Strength - massive parallelism. For workloads with huge parallelism, like the matrix operations in neural networks, GPUs deliver an order of magnitude higher throughput than CPUs on deep-learning training.
  • Limitation - still general-purpose. Because a GPU must support many kinds of instructions and applications, each of its thousands of ALUs still has to frequently read/write registers or shared memory to fetch data and store intermediate results. Newer architectures optimize this, but the general-purpose overhead remains.

TPU: tensor processing

Tensor Processing Units (TPUs) are application-specific integrated circuits (ASICs) designed by Google to accelerate machine learning. Their speed comes from the architecture - specifically the systolic array.

How a TPU works. The systolic array wires thousands of multiply-accumulators directly together into one large physical matrix, purpose-built for the multiply-accumulate operations at the center of matrix math. A single Trillium TPU has two matrix multiplication units (MXUs) plus a scalar unit.

How a TPU works
FactsTPU dataflow
  • Data streams from the host into an infeed queue, then into the TPU's High Bandwidth Memory (HBM).
  • To multiply, the TPU loads parameters and data from HBM into the MXU.
  • As each multiplication happens, the result is passed directly to the next multiply-accumulator - no repeated memory access during the core matrix multiply.
  • Final results move to an outfeed queue for the host to retrieve.
  • Eliminating memory access mid-multiply is what gives TPUs exceptionally high throughput on neural-network math.

Recap

DECISIONWhich processor?
General-purpose work, data preprocessing, control flow, low-cost inferenceCPU
Flexible parallel ML, mixed frameworks, rendering, order-of-magnitude speedup over CPUGPU
Very large TensorFlow/JAX training dominated by matrix multiplyTPU
Pick this when: CPU for general/flexible work; GPU for flexible parallel ML; TPU for large-scale TF/JAX matrix math
CPUgeneral-purposeGPUparallelTPUtensor / ASICWhat it isGeneral-purpose processor (vonNeumann)Thousands of general-purpose ALUsGoogle ASIC built around asystolic arrayBest atFlexibility - runs any software;preprocessing, control flow,low-cost inferenceMassive parallelism; ~10x CPUthroughput on deep-learningtrainingLarge-scale matrix multiply withalmost no mid-compute memoryaccessKey limitvon Neumann memory-accessbottleneckStill general-purpose - ALUs keephitting registers / shared memoryPurpose-built - narrow to MLmatrix math
CPU, GPU, and TPU compared - what each one is, where it wins, and what holds it back.

For the exam-facing angle - GPU vs. TPU selection, attaching GPUs to VMs, quota and zonal availability caveats - see GPUs & TPUs.