Norman P. Jouppi, Cliff Young, Nishant Patil, David Patterson, et al.
Google, Inc.
ISCA 2017
Presenter: wzw
Date: 2026-04-27
NN inference 真正受限的不是峰值 TOPS,而是 严格 P99 latency 下的有效吞吐。256×256 systolic INT8 MXU + 28 MiB software-managed on-chip memory + 极简确定性执行模型,主动放弃通用处理器特性。K80 达到 13.2× 几何均值、15.3× 加权均值性能提升,performance/Watt 达 25× ~ 29×。2×MLP + 2×LSTM + 2×CNN 覆盖 Google 当时 95% 的 datacenter NN inference 需求。99th-percentile response time,不是离线大 batch 吞吐。8-bit 运算;作者的判断是:训练继续放在 GPU,推理值得做专用 ASIC。| Platform | Batch | 99th% latency | IPS | % Max IPS |
|---|---|---|---|---|
| CPU | 16 | 7.2 ms |
5,482 | 42% |
| GPU | 16 | 6.7 ms |
13,461 | 37% |
| TPU | 200 | 7.0 ms |
225,000 | 80% |
MLP0 为例,应用给出的时延预算只有 7 ms。K80 的优势建立在高吞吐、大 batch、多线程隐藏延迟上;一旦时延封顶,很多峰值能力根本用不上。K80 只比 Haswell 略快,远没有训练场景那种代际优势。
Fig.8 说明 TPU 的 6 个 workload 都高于 CPU/GPU roofline,但 4/6 仍是 memory-bound。INT8 MAC 和片上 SRAM,而不是复杂控制。
PCIe Gen3 x16 下发指令;TPU 更像矩阵 FPU coprocessor,而不是小型 GPU。Weight Memory -> FIFO -> MXU -> Accumulators -> Activation -> Unified Buffer。
24 MiB Unified Buffer 占 die 近 1/3,Matrix Multiply Unit 占约 1/4。67%,而 control 只有 2%。
256×256 = 65,536 个 INT8 MAC,峰值 92 TOPS。systolic execution 的目的不是“酷”,而是减少大 SRAM 的读写次数,把数据重用固化在数据流里。40 W 忙时功耗下塞进远多于 K80 的 MAC 数量。Weight Memory 是片外 8 GiB DRAM,权重经 Weight FIFO 分块流入 MXU;这决定了很多 workload 最终受制于 weight bandwidth。24 MiB Unified Buffer + 4 MiB Accumulators,完全是 software-managed memory,不是传统 cache。CISC:Read_Host_Memory / Read_Weights / MatrixMultiply / Activate / Write_Host_Memory,目的是减轻 PCIe 指令带宽压力。Unified Buffer,并把本层指令序列发给 TPU。Read_Weights 将当前 tile 的权重从 Weight Memory 预取到 Weight FIFO。MatrixMultiply/Convolve 在 256×256 MXU 上生成部分和,写入 Accumulators。Activate 完成 ReLU/Sigmoid/Pooling 等后处理,再写回 Unified Buffer 或 host,进入下一层。| Chip | Die | Busy Power | Peak TOPS | On-chip Memory |
|---|---|---|---|---|
| Haswell | 662 mm² |
145 W |
2.6 |
51 MiB |
| K80 die | 561 mm² |
98 W |
2.8 |
8 MiB |
| TPU | <331 mm² |
40 W |
92 |
28 MiB |
SECDED 与服务器级配置,不拿消费卡或研究原型凑数。MLP/LSTM/CNN,并按真实业务占比做 weighted mean。roofline、P99 latency、host overhead、performance/Watt。| Metric | GPU vs CPU | TPU vs CPU | TPU vs GPU |
|---|---|---|---|
| Geometric Mean | 1.1× |
14.5× |
13.2× |
| Weighted Mean | 1.9× |
29.2× |
15.3× |
MLP0 和 CNN1 分别可到 41× 和 71× CPU。LSTM1 只有 1.2× CPU,说明 workload shape 仍然非常关键。
Haswell,TPU server 的 total performance/Watt 达到 17× ~ 34×。K80,TPU 的 incremental performance/Watt 达到 25× ~ 29×。performance/Watt 当作 performance/TCO 的代理指标。
Fig.11 最重要的结论:把 memory bandwidth 提高 4×,平均性能约增 3×;单纯提高频率几乎没用。256×256 盲目放大到 512×512 还可能变慢,因为 tile fragmentation 更严重。TPU':基本不改计算核心,只把 DDR3 Weight Memory 升级成 GDDR5。2.6×,加权均值到 3.9×;计入 host overhead 后仍有 1.9× / 3.2×。14.1 TOPS;根因是浅 feature depth、28.1% weight stalls 与 22.8% RAW stalls。10% 负载时仍消耗 88% 满载功耗,明显不如 CPU/GPU。P99 latency under real deployment constraints。INT8 systolic MXU + substantial software-managed memory + deterministic execution 换到了数量级收益。low precision、systolic array、managed SRAM、roofline、latency-oriented serving。INT8 路线和更新 GPU 平台没有系统展开。TPU v2/v3/v4 连起来看,会更清楚地看到 Google 后续几代几乎都在补 memory system 和 scale-out fabric。