TPU v4: An Optically Reconfigurable Supercomputer for Machine Learning with Hardware Support for Embeddings

Norman P. Jouppi, George Kurian, Sheng Li, Peter C. Ma, Rahul Nagarajan, Lifeng Nai, Nishant Patil, Suvinay Subramanian, Andy Swing, Brian Towles, Cliff Young, Xiang Zhou, Zongwei Zhou, David A. Patterson

Abstract

Google’s TPU v4 represents a significant advancement in AI infrastructure, scaling to 4,096 nodes through the use of innovative Optical Circuit Switches (OCSes). This architecture allows for dynamic network reconfiguration, enhancing both reliability and performance. By integrating SparseCores—specialized hardware for embedding acceleration—TPU v4 addresses the critical bottlenecks of Deep Learning Recommendation Models (DLRMs). Evaluation shows that TPU v4 achieves a 2.1x performance improvement over TPU v3 and superior energy efficiency compared to contemporary GPUs like the Nvidia A100.

Introduction

Modern machine learning workloads present two primary challenges for supercomputer design. First, the explosive growth of Large Language Models (LLMs) requires massive scale and high reliability. Second, Deep Learning Recommendation Models (DLRMs) are often bottlenecked by "embeddings"—large look-up tables—rather than raw computational throughput. Traditional fixed-topology supercomputers struggle with these requirements; node failures can disrupt entire training runs, and standard AI chips are inefficient at the irregular memory patterns required for embeddings. TPU v4 was designed to solve these scaling, flexibility, and specialized compute challenges.

Architectural Innovations

The TPU v4 architecture rests on three primary pillars:

Optical Circuit Switching (OCS)

Unlike traditional electrical packet switches, TPU v4 utilizes MEMS-based mirrors to route optical signals. This allows the system to dynamically change its interconnect topology. The OCS enables the wrapping of a standard 3D torus into a "twisted" configuration, improving bisection bandwidth by up to 1.6x without additional cabling. Furthermore, the ability to route around failed racks in milliseconds significantly improves system availability.

TPU v4 logical 3D torus topology and its physical implementation via Optical Circuit Switches (OCSes)

SparseCore (SC)

To handle the "gather/scatter" memory patterns of DLRMs, TPU v4 integrates a SparseCore—a dedicated dataflow processor. Occupying only 5% of the die area and power, the SparseCore handles irregular memory accesses while the main TensorCores perform dense matrix multiplication. This specialization yields a 5x–7x speedup for embedding-heavy model components.

Platform-Aware NAS (PA-NAS)

Google employs Neural Architecture Search (NAS) to co-optimize DNN model structures with the TPU's physical topology. This ensures that software and hardware are synchronized for maximum efficiency.

The TPU v4 chip package (left) and the four-chip system board (right)

Evaluation and Results

TPU v4 was evaluated using a mix of production workloads (DLRM, RNN, CNN, Transformers) and industry-standard benchmarks like MLPerf Training 2.0.

  • Performance and Efficiency: TPU v4 outperforms TPU v3 by an average of 2.1x and improves performance-per-Watt by 2.7x. Compared to the Nvidia A100, TPU v4 is 1.2x–1.7x faster and 1.3x–1.9x more energy-efficient.
  • Large-Scale Training: During the training of the 540-billion parameter PaLM model, the 4,096-node system sustained 57.8% of peak hardware FLOPS over 50 days, demonstrating exceptional utilization and reliability at scale.
  • Sustainability: By optimizing the model, machine, mechanization (PUE), and map (clean energy grids), TPU v4 reduces AI's carbon footprint by approximately 20x compared to typical on-premise systems.

Discussion and Limitations

While TPU v4 offers significant advantages, it introduces new complexities. The flexibility of OCS requires sophisticated compiler and orchestration software to determine optimal topologies for specific jobs. Additionally, while the system scales to 4,096 chips, certain workloads encounter software bottlenecks that limit effective scaling. Future work will focus on pushing these software limits and comparing the architecture against newer technologies like the Nvidia H100, which was not available during the initial deployment of TPU v4.

Conclusion

TPU v4 demonstrates that reconfigurable optical interconnects and specialized hardware for embeddings are essential for the next generation of AI supercomputers. By prioritizing flexibility and efficiency, Google has created a platform capable of training the world's largest models with significantly reduced environmental impact.

Summary updated

BibTeX
@inproceedings{jouppi2023tpu,
  author = {Norman P. Jouppi and George Kurian and Sheng Li and Peter C. Ma and Rahul Nagarajan and Lifeng Nai and Nishant Patil and Suvinay Subramanian and Andy Swing and Brian Towles and Cliff Young and Xiang Zhou and Zongwei Zhou and David A. Patterson},
  title = {{TPU v4: An Optically Reconfigurable Supercomputer for Machine Learning with Hardware Support for Embeddings}},
  booktitle = {ISCA},
  year = {2023},
  doi = {10.1145/3579371.3589350},
}

Loading related content...

Figure