Cloud TPU

Also known as: Google Cloud TPU

On this page 8

Cloud TPU is the Google Cloud service that rents out Tensor Processing Units (TPUs), custom application-specific chips designed by Google to accelerate the matrix and tensor operations at the heart of neural networks. Within AI hardware it is the best-known example of a domain-specific accelerator offered as a cloud product rather than sold as a physical card, and it is used to train and serve large models in artificial intelligence, including language, vision and recommendation systems.

Customers do not buy TPU chips; they reserve TPU virtual machines, slices or entire pods by the hour or through committed contracts. Also called Google Cloud TPU, the service pairs the hardware with the XLA compiler and frameworks such as JAX, PyTorch and TensorFlow, so most users interact with it through ordinary model code rather than low-level programming.

How a Cloud TPU chip processes neural network workloads

A TPU chip is built around one or more TensorCores, each containing large matrix multiply units (MXUs) organized as systolic arrays. In a systolic array, operands flow rhythmically through a grid of multiply-accumulate cells, so each value fetched from memory is reused many times. This design delivers very high arithmetic intensity with far less control logic than a general-purpose processor.

Each chip also includes a vector unit for element-wise operations, a scalar unit for control, and high-bandwidth memory (HBM) stacked next to the die. Many generations add SparseCores, specialized units that accelerate the embedding lookups common in recommendation and ranking models. The native numeric format is bfloat16, with accumulation in 32-bit floating point, and newer chips add int8 and FP8 support for inference.

The table below summarizes the main building blocks and what each one contributes to performance.

ComponentFunctionEffect on workloads
Matrix multiply unitSystolic multiply-accumulate gridDense layers, attention, convolutions
Vector unitElement-wise math and activationsNormalization, softmax, optimizers
SparseCoreGather and scatter for embeddingsRecommendation and ranking models
HBMOn-package high-bandwidth memoryLimits model size and memory-bound speed
Inter-chip interconnectDirect chip-to-chip linksScaling across slices and pods
Main components of a TPU chip

Cloud TPU generations and their roles

Google has released TPU generations at a cadence of roughly one to two years, and Cloud TPU offers several of them at once. Generations split into performance-oriented chips for the largest training runs and efficiency-oriented chips optimized for cost per operation in training and serving. Figures below are approximate published peak values per chip and vary by numeric format.

GenerationOrientationApproximate peak per chipMaximum pod scale
TPU v4Training at scaleAbout 275 TFLOPS bfloat164,096 chips
TPU v5eCost-efficient training and servingAbout 197 TFLOPS bfloat16256 chips
TPU v5pLarge model trainingAbout 459 TFLOPS bfloat168,960 chips
Trillium (v6e)Efficient training and servingAbout 918 TFLOPS bfloat16256 chips
Ironwood (v7)Inference-focused at large scaleSeveral PFLOPS in FP89,216 chips
Selected Cloud TPU generations

Peak numbers are an upper limit, not a promise. Real utilization depends on batch size, model shape, memory traffic and communication, and well-tuned large training jobs typically reach roughly 40 to 60 percent of the theoretical peak, which practitioners report as model FLOPs utilization.

Slices, pods and the interconnect

Cloud TPU capacity is provisioned in slices, which are groups of chips connected by the dedicated inter-chip interconnect (ICI) in a two- or three-dimensional torus topology. A full pod is the largest group that shares this fast fabric. From TPU v4 onward, optical circuit switches let Google reconfigure the topology and route around failed hosts without rewiring.

Jobs larger than one pod span several pods connected over the data-center network, a setup Google calls Multislice. Because the data-center network is slower than ICI, frameworks place the most communication-heavy parallelism, such as tensor parallelism, inside a slice and the lighter data parallelism across slices.

Cloud TPU compared with data-center GPUs

The main alternative to Cloud TPU is renting data-center GPUs such as NVIDIA Hopper or Blackwell systems, or using other custom chips like AWS Trainium. The choice is less about raw peak speed and more about software ecosystem, availability and cost per useful operation.

AspectCloud TPUData-center GPU
AvailabilityGoogle Cloud onlyMany clouds and on-premises
Programming modelCompiled through XLACUDA kernels plus compilers
Framework fitStrongest with JAXStrongest with PyTorch
Scale-out fabricICI torus within a podNVLink domains plus InfiniBand or Ethernet
Custom kernelsPallas, more limited ecosystemVery large kernel ecosystem
PortabilityVendor lock-in riskBroad hardware portability
Cloud TPU versus data-center GPU instances

Using Cloud TPU in practice

A typical workflow starts by choosing a TPU type and slice shape, for example a v5e slice with 16 chips, then running code on the attached host virtual machines or through Google Kubernetes Engine. The program is traced and compiled by XLA into a static graph, sharded across chips by annotations in JAX or by PyTorch/XLA, and executed in a synchronized fashion across the slice.

WorkloadSuggested optionReason
Pretraining a very large modelPerformance-class pod slicesLargest HBM and ICI scale
Fine-tuning a mid-size modelEfficiency-class sliceLower cost per training step
High-volume batch inferenceSpot or preemptible capacityDeep discounts for interruptible jobs
Online serving with tight latencyReserved inference-class chipsPredictable capacity and throughput
Research with custom operatorsData-center GPU insteadRicher kernel tooling
Matching workloads to Cloud TPU options

Limitations and common pitfalls

Most problems with Cloud TPU come from the compiled, static execution model. Code that changes tensor shapes on every step forces repeated recompilation, and operations that are not supported efficiently by XLA may fall back to slow paths. The following issues are the ones experienced teams check first.

  • Dynamic shapes: variable sequence lengths trigger recompilation; pad or bucket inputs to fixed sizes.
  • Input pipeline bottlenecks: slow data loading on host machines leaves chips idle.
  • Poor sharding choices: wrong mesh layouts cause excessive communication and low utilization.
  • Capacity planning: large slices of newer generations may require reservations well in advance.
  • Single-provider dependence: workloads tuned for TPUs need effort to move to other hardware.

In simple terms

A Cloud TPU is a special chip for AI that you rent over the internet. It is built to do one kind of math very fast. That math is multiplying large tables of numbers. Neural networks need this math billions of times.

Instead of buying expensive machines, a team rents time on these chips. They can use one chip or thousands linked together. The trade-off is flexibility: the chips are very fast for AI but are only available from one cloud provider.

A practical example

A research group at a university wants to fine-tune a 7-billion-parameter language model on legal documents. Its own GPU server would need about three weeks for the job. The group writes its training loop in JAX, defines a device mesh, and requests a v5e slice with 64 chips on spot pricing.

After padding documents into fixed sequence lengths of 2,048 and 4,096 tokens to avoid recompilation, the job reaches about 50 percent model FLOPs utilization. Training finishes in roughly two days, and two interruptions are absorbed by restarting from checkpoints saved every 30 minutes. The group then serves the model on a smaller slice for an internal search tool.