Skip to content
tezvyn:

Google TPU: Built for Matrix Math

Source: en.wikipedia.orgEasyHow cards are made

Google TPU: Built for Matrix Math

A TPU is a specialist ASIC, not a faster GPU; it trades graphics flexibility for matrix-math throughput per watt. Google deploys them for TensorFlow, JAX, and PyTorch at scale. They excel at CNNs but can lag on tasks needing rasterization or recurrent logic.

Why it exists

Machine learning workloads demand enormous computation, yet general-purpose CPUs and GPUs carry hardware for graphics tasks like rasterization and texture mapping that neural networks do not need. In 2013, Google recruited Amir Salek to establish custom silicon development and assigned Norman P. Jouppi as tech lead to build an application-specific integrated circuit that could accelerate neural network math with far greater efficiency.

The mental model

Think of a GPU as a Swiss Army knife and a TPU as a purpose-built factory line. A GPU can render graphics and train neural networks because it packs flexible parallel units. A TPU rips out the graphics circuitry entirely and replaces it with a systolic array dedicated to low-precision tensor operations. The result is a chip that fits into a data-center hard-drive slot yet delivers 15 to 30 times the inference performance and 30 to 80 times the performance per watt of the CPUs and GPUs it replaced.

How it works

The TPU is an ASIC built around a systolic array, an architecture chosen from three separate accelerator designs explored at Google. It was specifically created for the TensorFlow framework, though it now supports JAX and PyTorch as well. The hardware targets high volumes of low-precision computation, using as little as 8-bit precision, which saves energy compared to the broader floating-point units found in CPUs and GPUs.

When to use it

Reach for a TPU when you are training or inferencing convolutional neural networks at scale through Google Cloud. The chip is designed for the TensorFlow, JAX, and PyTorch frameworks and for workloads that benefit from high-volume, low-precision math.

When not to use it

Do not use a TPU for graphics rendering or any workload that relies on rasterization and texture mapping because the chip lacks that hardware entirely. TPUs are well suited for convolutional neural networks, while GPUs have benefits for some fully connected neural networks, and CPUs can have advantages for recurrent neural networks. Forcing the wrong model type onto TPU silicon wastes time and money.

One canonical example

In 2017, Google published the seminal paper In-Datacenter Performance Analysis of a Tensor Processing Unit, showing that its first production TPU was designed and deployed in just 15 months and was already powering production services across Google. That chip achieved 15 to 30 times higher performance and 30 to 80 times higher performance per watt than contemporary CPUs and GPUs, proving that a narrow, custom-built accelerator could outperform general-purpose silicon on its home turf.

Interview question

What architectural choice primarily allows a TPU to exceed GPUs in inference performance per watt for neural networks?

  • a.It runs at significantly higher clock frequencies than general-purpose chips
  • b.It integrates flexible parallel units that also handle graphics rendering
  • c.It raises computation precision to 64-bit floating point for greater accuracy
  • d.It replaces graphics hardware with a systolic array tuned for low-precision tensor operationsCorrect
Why?

The TPU achieves higher efficiency by stripping out graphics circuitry and using a systolic array for low-precision tensor math. A is tempting because GPUs rely on flexible parallel units, but the TPU specifically trades that flexibility to maximize matrix-math throughput per watt.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles