Why matrix multiplication matters #
A neural-network layer often combines many inputs with learned weights. Grouping these operations into matrices exposes regular, parallel work. A chip can arrange arithmetic units and local storage so that a weight or activation participates in several calculations before moving elsewhere. Specialization earns its place when enough of the application follows that pattern.
General-purpose processors devote resources to handling diverse instruction streams and unpredictable control flow. An accelerator trades some of that flexibility for a workload it can execute efficiently. Software must translate a model into operations the device supports and schedule those operations so that its arithmetic units receive data on time.
A documented early TPU #
Google’s first-generation Tensor Processing Unit entered its data centers in 2015. A 2017 evaluation describes an array of 65,536 eight-bit multiply-accumulate units and tests inference workloads used by Google. The researchers also considered strict response-time requirements. A service can care about the slowest fraction of responses even when its average speed looks excellent.
Comparing two devices #
A meaningful comparison holds the workload and acceptable output quality constant. It specifies precision, batch size, memory use and whether the job is training a model or serving it. Peak arithmetic capacity sets an upper bound. If an application repeatedly fetches large weights for small batches of requests, available memory bandwidth may determine how much of that capacity translates into completed work. Compute governance proposals also need a unit of comparison. Counting installed chips and estimating the operations actually executed in a training run can produce very different measurements.
Throughput under a response deadline #
The first TPU evaluation included production inference applications and examined response-time constraints at the 99th percentile. That choice matters for interactive services. A device might efficiently process a large batch of examples together, yet wait too long to fill the batch during quiet periods. For a user waiting for a result, the time spent in the queue counts along with the time the chip spends calculating.
Suppose a service promises that 99 requests in 100 will return within a particular deadline. A test reporting only average operations per second cannot show whether it meets the promise. A more informative comparison fixes the request mix, input sizes, accuracy and arrival pattern, then measures the greatest sustained throughput compatible with that deadline. Designs can change places in such a comparison if their strengths suit different batch sizes or if a model spends much of its time on operations the accelerator does poorly.
How Eyeriss reuses one pixel #
Consider a filter that slides across an image in steps of one pixel. Two neighboring three-by-three windows overlap in six pixels. The arithmetic for the second window still needs nine input values, but a processor that kept the overlapping values close by has only three new ones to fetch. The same filter weights can also serve many windows. A third opportunity is to keep a running sum nearby while successive products contribute to one output.
The Eyeriss researchers explored these three forms of reuse in a chip architecture they called row-stationary. Their design gave processing elements local storage and allowed neighboring elements to exchange data. Under the same area and parallelism constraints, their analysis of AlexNet’s convolutional layers found energy efficiency 1.4 to 2.5 times that of the alternative dataflows they evaluated. The range belongs to those comparisons. A different filter shape, layer type or batch size changes how often each value can be reused and where it is economical to hold it.
Sources
- Norman Jouppi and colleagues · In-Datacenter Performance Analysis of a Tensor Processing Unit (2017) research.google
- Samuel Williams, Andrew Waterman and David Patterson · Roofline (2008) www2.eecs.berkeley.edu
- Girish Sastry and colleagues · Computing Power and the Governance of Artificial Intelligence (2024) arxiv.orgCited in
- Yu-Hsin Chen, Joel Emer and Vivienne Sze · Eyeriss: A Spatial Architecture for Energy-Efficient Dataflow for Convolutional Neural Networks (2016) dspace.mit.eduCited in
Step 3 of 5