Sitemap

AI Chips: Google TPU

7 min readAug 24, 2020

--

Press enter or click to view image in full size
Source: Google
Press enter or click to view image in full size
Source: Google
Press enter or click to view image in full size
Source
Press enter or click to view image in full size
Source 420 teraflops, 128 GB HBM
Press enter or click to view image in full size
Source: Google
Original source
Press enter or click to view image in full size
Source
Press enter or click to view image in full size
Source
Press enter or click to view image in full size
Image source: Wikipedia. A 2-D toroidal mesh topology
Original source

It distributes the weight update computation across TPU-v3 cores and then use an optimized all-gather to broadcast the new weights to all the TPU-v3 cores.

Press enter or click to view image in full size
Source
Press enter or click to view image in full size
MAC Unit
Press enter or click to view image in full size
Modified from source
Press enter or click to view image in full size
TPU Block Diagram

The TPU instructions are sent from the host over the peripheral component interconnect express (PCIe) Gen3 x16 bus into an instruction buffer. The internal blocks are typically connected together by 256-byte-wide paths. Starting in the upper-right corner, the matrix multiply unit is the heart of the TPU, with 256×256 MACs that can perform eight-bit multiply-and-adds on signed or unsigned integers. The 16-bit products are collected in the four megabytes of 32-bit Accumulators below the matrix unit. The four MiB represents 4,096, 256-element, 32-bit accumulators. The matrix unit produces one 256-element partial sum per cycle.

The weights for the matrix unit are staged through an on-chip “Weight FIFO” that reads from an off-chip eight-gigabyte DRAM we call “weight memory”; for inference, weights are read-only; eight gigabytes supports many simultaneously active models. The weight FIFO is four tiles deep. The intermediate results are held in the 24 MiB on-chip “unified buffer” that can serve as inputs to the Matrix Unit. A programmable DMA controller transfers data to or from CPU Host memory and the Unified Buffer. To be able to deploy dependably at Google scale, internal and external memory include built-in error-detection-and-correction hardware.

Press enter or click to view image in full size
Source

Google’s fourth-generation TPU ASIC offers more than double the matrix multiplication TFLOPs of TPU v3, a significant boost in memory bandwidth, and advances in interconnect technology. Google’s TPU v4 MLPerf submissions take advantage of these new hardware features with complementary compiler and modeling advances. The results demonstrate an average improvement of 2.7 times over TPU v3 performance at a similar scale in the last MLPerf Training competition.

--

--