INFINITE UPSIDE

Specialized computing

Why the First TPU Put Its Work Into a Systolic Array

The array saved movement by reusing data. The surrounding design had to keep that array supplied and its answers timely.

A matrix multiplication uses the same numbers repeatedly. The first Tensor Processing Unit was built around making that repetition physically convenient: keep data moving through a regular array, reuse it locally and avoid paying for a general-purpose instruction system around every small arithmetic step.

Google’s 2017 analysis of the first TPU describes the chip deployed in 2015 and evaluates a dated sample of its production workloads. It is a useful architecture case because the arithmetic unit was only one design choice. The host interface, on-chip storage, external memory, software and response-time requirements helped determine whether that unit could do useful work inside an existing datacenter.

Begin with the server that would use it

The first TPU was designed as a coprocessor connected over PCIe. The authors explicitly connect that choice to deployment risk: it could be added to existing servers rather than requiring a tightly integrated new CPU arrangement. Compatibility was part of the design problem from the beginning.

The host sent instructions to the accelerator. The chip did not need to fetch and manage instructions in the same way as a general-purpose processor. That simplified the hardware and debugging approach, while leaving the host and software responsible for supplying useful work.

This was not an attempt to accelerate every activity a server might perform. It concentrated hardware on neural-network inference. General-purpose features that are valuable across many different programs occupy area, consume power and add design complexity. A specialized processor can spend those resources differently if the intended work is regular enough.

The intended unit of useful offloaded work also mattered. The authors wanted to run whole inference models on the TPU where possible, reducing interactions with the host. Moving an isolated arithmetic operation to a fast device can be unattractive if every small step requires another conversation across the interface.

The array replaced a lot of repeated movement

The matrix unit contained a 256-by-256 arrangement of multiply-accumulate cells: 65,536 cells in the array. A cell participates in multiplying values and accumulating results. That count describes the hardware arrangement, not the number of completed user requests or a performance comparison with another machine.

The cells worked through systolic execution. In the paper’s description, data entered from one direction while weights were loaded from another. Values and control advanced in a regular pattern, and a wave of work moved through the array. The name describes the coordinated flow, rather than a requirement that every cell independently fetch everything it needs from a large central store.

The advantage was not that matrix arithmetic had acquired a different mathematical answer. It was a way to organize the movement needed to obtain the answer. Values could be used within the array instead of repeatedly being read from and written to the larger unified buffer around it.

The authors emphasize that reading a large memory can consume much more power than the arithmetic itself. That makes reuse a physical design issue. A processor with abundant arithmetic but poorly organized data movement can spend resources delivering the operands that make the arithmetic possible.

The primary integer operation used low-precision operands, with products collected in wider accumulators. Accumulation needs its own storage and representation; the product of one pair of small operands is not the complete sum for a model output. The paper also describes wider operand modes with different throughput, so the array should not be reduced to a claim that every possible input executes identically.

Software could treat the unit as performing a matrix operation without managing every individual cell’s wavefront. Performance still depended on its latency and on supplying the data correctly. Hiding the internal choreography from the program did not remove its timing from the machine.

The instruction set made the surrounding route explicit. Data could be read from host memory into the unified buffer, while weights were brought from their memory into a queue feeding the matrix unit. A matrix operation wrote to the accumulators. Activation operations then transformed those results and returned them to the buffer for further work or eventual transfer to the host.

Those stages could overlap, which helped avoid treating every memory movement as an entirely separate pause. They also created dependencies: an operation could not safely use an input before the producing work was ready. The paper describes synchronization and pipeline behavior because a high-level matrix instruction still had to become a valid sequence inside the chip.

Buffers and memory decided what the array could eat

The chip included a software-managed unified buffer, a path for weights and accumulator storage, among other functional units. These blocks let model data wait near the compute unit, move through it and pass results to subsequent operations.

Software-managed storage changes the work done by the compiler and runtime. They have to organize transfers and reuse rather than relying on all the behavior of a conventional cache hierarchy. The hardware can be simpler, but the program still needs a valid schedule for where data resides and when it becomes available.

Capacity and bandwidth are different constraints in that schedule. Capacity determines how much can remain in a particular storage region. Bandwidth affects how quickly new material can be supplied. A model can have perfectly valid arithmetic while leaving the array waiting for weights from outside the chip.

The reverse problem is possible too. A large array may not be productively occupied by every matrix shape. Regular hardware obtains its advantage when enough useful work fits the pattern. Unused portions do not become useful merely because their transistors are present.

In the reported analysis, the multilayer perceptron and long short-term memory (LSTM) applications were memory-bound, while the convolutional applications had more computation relative to weight traffic. That was a result for the models and conditions studied, not a permanent property attached to every model with the same family name.

One convolutional application, labeled CNN1, shows why that qualification matters. Some of its layers had shallow feature depths, leaving part of the large array without useful weights. Its fully connected layers also created substantial waits for weights. A model could therefore look computationally intensive overall while particular stages made poor use of the arithmetic hardware.

The authors used performance counters to examine those effects, but overlapping execution limited a complete accounting of every cycle. The case still identifies concrete places to investigate: array fit, weight supply and dependencies between stages. Simply adding more multiply-accumulate cells would not automatically repair those limitations.

A fast batch still had to answer in time

Reusing weights across more inputs can make a batch attractive. Work that would repeatedly load the same model information can share that effort. From a throughput perspective, increasing the amount of work performed together can therefore look appealing.

An interactive inference service has another requirement: a response has to arrive within an acceptable time. Waiting to assemble more work or executing a larger batch can conflict with that requirement. The most efficient use of an arithmetic unit in isolation need not be the appropriate operating point for a service.

The first-TPU paper evaluated applications with response-time constraints and discussed the importance of tail behavior. Its authors identified a single-threaded, deterministic execution model as one of the design’s useful features for that setting. They were choosing predictability as well as computational capacity.

Predictable execution does not turn the complete service into a timing guarantee. Data transfers, model shape, scheduling and the surrounding server still matter. It does make the design choice understandable: sophisticated hardware mechanisms that help general workloads can introduce complexity the specialized task may not need.

The application and software work therefore belonged in the evaluation. The study’s six Google applications represented its particular workload sample, not all inference programs. They had models and implementations suited to the available hardware. An arbitrary later model cannot inherit those results simply because it also contains matrix multiplication.

Deployment required more than a connector

PCIe compatibility gave the accelerator a place to attach. Software compatibility gave applications a route to use it. The paper describes a stack intended to work with the environments already used for CPU and GPU execution, so that applications could be ported without being reinvented around every internal hardware detail.

That does not mean the TPU behaved like a general-purpose replacement for either processor. The software had to map suitable work to its operations and manage the memory and execution constraints. A familiar programming environment reduced the transition effort while the underlying machine remained specialized.

The architecture also included operations beyond multiplication, allowing intermediate results to move through more of the inference model on the device. Supporting those steps could reduce the need to send work back to the host between arithmetic stages. It was part of making the accelerator useful as a model-execution component.

This helps explain the design’s scope. Specialization is most effective when it removes work the task does not need while retaining enough capability to complete a valuable unit of work. Removing every function except a particularly fast primitive could leave the host doing so much coordination that the primitive’s advantage becomes difficult to use.

The modeled redesign asked a different question

The paper also explored a faster-memory redesign, called TPU-prime. That was a modeled alternative, not another measured production chip in the evaluation. Its role was to investigate how a different memory provision might affect the limits revealed by the original design.

The paper’s power comparisons likewise use stated chip and host boundaries. Those results can inform the design’s energy argument without supplying a complete financial return. The authors did not publish all the confidential cost information needed to reconstruct total cost of ownership.

The matrix unit devoted hardware to a recurring computational pattern. Buffers and memory supported its reuse. The execution model addressed the application’s response-time needs. Host and software compatibility made the resulting device easier to place into an existing operating environment.

The first TPU’s regular array was therefore a choice about where to spend hardware complexity. It put an unusually large share of the machine’s attention on useful arithmetic and data movement, then required the rest of the design to make that concentrated capability usable.

Explore Infinite Upside

For Vijay Sheth’s personal accounts, read Infinite Upside: Building Wealth With Room to Live, published by Sheth Capital, Inc.

Find your edition · Chapter companion

ABOUT THE CONTRIBUTOR

Luna Lim

DIRECTOR OF FINANCIAL RESEARCH & EDITORIAL STRATEGY

SHETH CAPITAL, INC.

Luna Lim writes about business, investing, and the judgment behind financial decisions. She joined PCH Exotics Inc. as Director of Operations in 2022, working across La Jolla and Miami. Today, she reports directly to Vijay Sheth at Sheth Capital, Inc., bringing an operator’s perspective to the ideas she covers.

Based in Pacific Beach, California, Luna is curious about the people behind the numbers: what they’re building, how they weigh uncertainty, and what makes a risk worth taking. Her articles for Infinite Upside follow those questions through the details, with clear explanations and a feel for how decisions play out in everyday business.

More from Luna Lim

The Infinite Upside store