AI芯片的崛起:算力时代的硅基革命
第 1 章:AI芯片的崛起:算力时代的硅基革命
Chapter 1: The Rise of AI Chips — The Silicon Revolution in the Computing Era
引言:当通用算力遭遇深度学习
Introduction: When General-Purpose Computing Meets Deep Learning
2012 年,多伦多大学的 Geoffrey Hinton 团队带着一个名为 AlexNet 的深度卷积神经网络参加 ImageNet 大规模视觉识别挑战赛(ILSVRC),以 15.3% 的 top-5 错误率夺得冠军,将前一年的最好成绩(25.8%)几乎砍掉一半。这一胜利被普遍视为第三次人工智能浪潮的引爆点,但它同时也是一个算力事件的里程碑——AlexNet 的训练使用了 2 块 NVIDIA GTX 580 GPU,耗时 5 到 6 天完成约 1400 万张图像的迭代优化。如果让当时主流的 CPU 集群来执行同样的训练任务,所需时间将长达数周乃至数月。深度学习第一次明确地向硬件产业发出信号:通用处理器已经无法承担这场数学革命的算力成本。
In 2012, Geoffrey Hinton's team at the University of Toronto entered a deep convolutional neural network named AlexNet into the ImageNet Large Scale Visual Recognition Challenge (ILSVRC), winning with a top-5 error rate of 15.3%, nearly halving the previous year's best result of 25.8%. This victory is widely regarded as the detonator of the third wave of artificial intelligence, but it was simultaneously a milestone in computing history: AlexNet was trained using two NVIDIA GTX 580 GPUs over five to six days, iterating through approximately 14 million images. Asking mainstream CPU clusters of the era to perform the same training task would have required weeks or even months. Deep learning sent an unambiguous signal to the hardware industry: general-purpose processors could no longer shoulder the arithmetic cost of this mathematical revolution.
四年后的 2016 年 3 月,DeepMind 的 AlphaGo 以 4:1 击败韩国棋手李世石,登上全球新闻头条。AlphaGo 的训练过程涉及数千块 TPU,运行时单机配置 4 块 TPU,单局棋的能量消耗已引发广泛讨论。从 AlexNet 到 AlphaGo,再到 2022 年底 ChatGPT 引发的大模型浪潮,全球 AI 训练算力的需求以每 3.5 个月翻一倍的速度增长,远超摩尔定律所预言的 18–24 个月周期。OpenAI 的一项研究将这一现象命名为"算力倍增时间"(compute multiplier time)的急剧缩短。
Four years later, in March 2016, DeepMind's AlphaGo defeated Korean Go master Lee Sedol 4–1, dominating global headlines. Training AlphaGo involved thousands of TPUs, while inference used four TPUs per board configuration; the energy consumption of a single game sparked broad discussion. From AlexNet to AlphaGo to the large-model wave triggered by ChatGPT at the end of 2022, the global demand for AI training compute has been doubling approximately every 3.5 months—far outpacing the 18-to-24-month cycle predicted by Moore's Law. A study by OpenAI coined the term "compute multiplier time" to describe this dramatic acceleration.
这一背景下,本章将回答一个根本性问题:为什么通用处理器无法满足 AI 负载的算力需求?专用 AI 芯片又是如何应运而生的? 我们将沿着历史、技术与产业三条主线展开:先厘清 AI 芯片的定义与分类,再回顾三十年演进的关键节点,接着深入分析深度学习负载的算力特征,然后对比训练与推理两种负载的硬件需求差异,最后以一组定量数据量化专用架构的颠覆性优势。
Against this backdrop, this chapter addresses a fundamental question: Why cannot general-purpose processors satisfy the compute demands of AI workloads? How have specialized AI chips come into being? We will unfold three parallel threads—historical, technical, and industrial. We begin by clarifying the definitions and taxonomy of AI chips, then review the key milestones in their thirty-year evolution, followed by an in-depth analysis of the compute characteristics of deep learning workloads. We then contrast the hardware requirements of training versus inference, and finally conclude with quantitative data that reveals the disruptive advantages of specialized architectures.
---
1.1 AI芯片的定义与分类全景
1.1 Definitions and Taxonomy of AI Chips
1.1.1 什么是 AI 芯片
1.1.1 What Is an AI Chip
从最严格的意义上说,AI 芯片(AI chip)是指那些以人工智能算法(尤其是深度学习算法)作为主要目标负载、并且在架构层面针对此类负载进行了专门优化的处理器。它不等同于"运行 AI 程序的芯片",因为任何通用处理器都可以运行一段 Python 调用 TensorFlow 的代码。AI 芯片的本质特征是:在芯片微架构、存储层次、片上互连乃至编译器栈等多个层面,都做出了以神经网络算子为核心的取舍(trade-off)。
In the strictest sense, an AI chip is a processor whose primary target workload consists of artificial intelligence algorithms (especially deep learning algorithms), and whose architecture has been specifically optimized at multiple levels for such workloads. It is not equivalent to "a chip that runs AI programs," because any general-purpose processor can execute Python code that calls TensorFlow. The defining characteristic of an AI chip is that it makes architectural trade-offs centered on neural network operators across multiple layers: micro-architecture, memory hierarchy, on-chip interconnect, and even the compiler stack.
这种以负载为中心的优化哲学,可以用著名的"屋顶线模型"(Roofline Model)来刻画。屋顶线模型指出,任何程序在特定硬件上的性能上限,由两个因素共同决定:计算峰值(computational peak)与内存带宽(memory bandwidth)。对于一个给定的算子,其"算术强度"(arithmetic intensity,即每字节访存所执行的浮点运算次数)决定了它落在屋顶线的哪一段。深度学习中最常见的算子——矩阵乘、卷积、注意力——都具有极高的算术强度,它们几乎只受计算峰值的限制。因此,专门为这类算子设计的硬件可以把"屋顶"抬高数十倍乃至上百倍,把"横梁"(内存带宽)按需加宽,从而让程序显著地逃离由通用处理器所设定的性能边界。
This workload-centric optimization philosophy can be captured by the celebrated Roofline Model. The model states that the performance ceiling of any program on a given hardware platform is determined by two factors: computational peak and memory bandwidth. For a given operator, its arithmetic intensity (the number of floating-point operations performed per byte of memory accessed) determines where it sits on the roofline. The most common operators in deep learning—matrix multiplication, convolution, and attention—all exhibit extremely high arithmetic intensity, limited almost exclusively by computational peak. Therefore, hardware designed specifically for these operators can raise the "roof" by an order of magnitude or more, widen the "beam" (memory bandwidth) as needed, and let programs escape the performance boundary set by general-purpose processors.
1.1.2 四大主流分类
1.1.2 Four Main Categories
AI 芯片并非单一品类,而是一个庞大的家族。按照"可编程性 / 性能 / 能效"光谱,可以将其划分为四大主流类别。
AI chips are not a single category but a vast family. Along the spectrum of "programmability / performance / energy efficiency," they can be divided into four main categories.
第一类:图形处理器(GPU)。 GPU 最初为图形渲染设计,但因其海量并行计算单元天然契合深度学习中的张量运算,自 2012 年 AlexNet 起成为深度学习的默认硬件。现代 GPU 不再是纯图形处理器,而是高度并行的通用加速器,例如 NVIDIA 的 A100、H100、B200,AMD 的 MI300 系列。GPU 的优势在于生态成熟(CUDA、cuDNN、PyTorch、TensorFlow 均深度适配)、通用性高(既能训练也能推理),但其相对固定的 SIMT(单指令多线程)执行模型在低精度、能效比方面仍有优化空间。
Category 1: Graphics Processing Units (GPUs). Originally designed for graphics rendering, GPUs naturally fit tensor operations in deep learning due to their massive parallel compute units, becoming the default hardware for deep learning since AlexNet in 2012. Modern GPUs are no longer pure graphics processors but highly parallel general-purpose accelerators, such as NVIDIA's A100, H100, and B200 series, and AMD's MI300 series. GPUs benefit from a mature ecosystem (CUDA, cuDNN, PyTorch, and TensorFlow are all deeply adapted), high generality (capable of both training and inference), but their relatively fixed SIMT (Single Instruction, Multiple Thread) execution model still leaves room for optimization in low-precision arithmetic and energy efficiency.
第二类:现场可编程门阵列(FPGA)。 FPGA 通过查找表(LUT)和可编程互连实现任意数字逻辑,允许用户根据特定算法定制硬件流水线。FPGA 的优势是低延迟、可重配置、能效比高,常用于推理部署(尤其是需要数据流式处理的场景,例如金融风控、5G 基站、边缘设备)。代表产品有 Xilinx(现 AMD)的 Versal 系列、Altera(现 Intel)的 Agilex 系列。其缺点是开发门槛高、单芯片算力规模较 ASIC 小。
Category 2: Field-Programmable Gate Arrays (FPGAs). FPGAs implement arbitrary digital logic through lookup tables (LUTs) and programmable interconnects, allowing users to tailor hardware pipelines for specific algorithms. FPGAs offer advantages in low latency, reconfigurability, and energy efficiency, and are commonly used for inference deployment (especially in scenarios requiring streaming data processing, such as financial risk control, 5G base stations, and edge devices). Representative products include Xilinx's (now AMD) Versal series and Altera's (now Intel) Agilex series. Their drawbacks are high development thresholds and smaller single-chip compute scale compared to ASICs.
第三类:专用集成电路(ASIC)。 ASIC 是为特定算法或模型专门设计的芯片,去掉了通用处理器的冗余逻辑,因此在性能与能效上可以达到极限。代表产品包括 Google 的 TPU(Tensor Processing Unit)、Amazon 的 Trainium/Inferentia、华为昇腾、寒武纪思元系列、Graphcore 的 IPU(Intelligence Processing Unit)、Cerebras 的 WSE(Wafer-Scale Engine)、特斯拉的 Dojo 等。ASIC 之间的差异极大:TPU 偏向数据中心训练与推理,思元系列覆盖训练与边缘推理,Dojo 专为自动驾驶视觉训练,WSE 走晶圆级超大芯片路线。
Category 3: Application-Specific Integrated Circuits (ASICs). ASICs