Log inStart free
LESSON 26.11 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Systolic arrays and other accelerators

Watch inputs and sums pulse through a grid of multiply-add cells.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 26.11 · ACCELERATORS27 MACS · ONE UNIT: 27 CYCLES, 54 READS
01
Stage 1 of 6 · One MAC unit
X times W needs 27 MACs. One MAC unit takes 27 cycles and 54 memory reads.
Explain it simply

Each result in Y adds up 3 products, one input times one weight. A MAC, a multiply then an add, makes one product. A plain processor has one MAC unit, so it does 27 MACs one after another. It also reads both numbers from memory every time, which is 54 reads.

X has 3 rows of 3 inputs. W is 3 by 3. One MAC unit needs 27 cycles and 54 reads.

inputs Xweights Wsums and results Yidle PE cycles
w 2w 3w 2w 1w 2w 2w 1w 3w 2122116112116152922431332443one MAC unit27 cycles · 54 memory readsY = X · WX (inputs)W (weights)Y (results)w 2w 3w 2w 1w 2w 2w 1w 3w 2122116112116152922431332443one MAC unit27 cycles · 54 memory readsY = X · WX (inputs)W (weights)Y (results)
Toy: a 3×3 array, small whole numbers. TPU v3 figures are public; the NPU and custom chip are examples.
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
ymn=∑kxmk wkn\sy{y}{out}{y_{mn}} = \sum_k \sy{x}{data}{x_{mk}}\,\sy{w}{param}{w_{kn}}
y11=4⋅2+3⋅1+1⋅1=12y_{11} = 4\cdot 2 + 3\cdot 1 + 1\cdot 1 = 12

Each result adds the products of a row and a column.

Common mix-ups

MYTHOne input row keeps the whole array busy.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With 6 batch rows instead of 3, does the busy share go up or down?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.