Majid Al-RaimiEIE results and what came after

COE 592Lecture 4.2Part 09

EIE results and what came after

Non-zero detection after ReLU, EIE's special design choices, its throughput and energy lead over CPU, GPU, FPGA and other ASICs, and the retrospective lessons that shaped later sparse hardware.

Concepts
5
Slides
71-77
Reading
30 min
Understood
0/5 concepts

Why this part matters

Your research on embedded machine learning lives or dies on the memory hierarchy. EIE is the canonical proof that eliminating DRAM traffic, not building faster multipliers, is the lever that moves energy by orders of magnitude.

The previous part built the processing element block by block. This part finishes the pipeline (ReLU and non-zero detection close the loop back to the next layer), then reads the results the way a reviewer would: nine benchmark layers, two log-scale charts, and the headline numbers you must be able to quote and qualify. It ends with the authors' own retrospective seven years later, which is a ready-made map from 2016 fine-grained sparsity to today's 2:4 tensor cores and W4A16 LLM inference. Exam questions on this lecture ask for the headline numbers, the energy breakdown and EIE's limits.

By the end you can

  1. Trace an output activation from the accumulator through ReLU and leading non-zero detection back into the next layer's broadcast.
  2. Explain each of the four energy factors (120x, 10x, 8x, 3x) and rank them using the Horowitz energy table.
  3. Quote and interpret 189x, 13x, 24,000x and 3,400x, including the batch size 1 caveat.
  4. Read a log-scale cross-platform chart critically, separating order-of-magnitude signal from process-node noise.
  5. List what EIE could not do and name the successor idea for each limitation, ending at 2:4 sparsity.

Follow one output row to the end. The accumulator for row i has just finished summing every product of a broadcast activation and a decoded weight from that row. The sum lands in a destination activation register. ReLU clamps it: a negative sum becomes zero, a positive one is kept. Now the leading non-zero detection logic scans the register file and reports the first non-zero it finds, as a pair "value v at index j". For the next layer, the central control unit broadcasts only those pairs. The output of this layer is already the sparse input of the next one, and no dense vector was ever written out.

That is the loop the slides close. Part 08 showed how a broadcast activation fans out to the processing elements and how each PE walks its CSC column; this part shows how the results become the next broadcast. The detection is hierarchical: each group of four PEs feeds a leading non-zero detection node, those nodes feed another, and the root of the tree sits inside the central control unit and drives the H-tree broadcast. Han et al. report 21 such nodes for 64 PEs (16 + 4 + 1), each about 0.023 mW and 189 µm², well under 0.3% of one PE. The machinery that keeps both ends of the datapath sparse is almost free.

After the accumulators finish, ReLU clamps the two negative registers, leaving three of six non-zero; a caret scans to the first one, and the loop draws back to the PE array with only (value, index) pairs.
Accumulate
arithmetic unit

Sum of activation times decoded weight per row

dest regs
ReLU
act R/W

Negatives become zero; typical density falls to about 30%

scan
LNZD
quadtree to CCU

Report the next non-zero and its index

broadcast
PE array
next layer

Only non-zero (value, index) pairs are queued

One layer's output becomes the next layer's sparse input without leaving the chip

The four special aspects, and the saving each one buys

The lecturer highlights four blocks on the PE diagram as EIE's special aspects. Each of them is a concrete piece of hardware, and each maps onto one of the four factors in the paper's energy breakdown. Reading them as pairs is what turns the block diagram into an argument.

Special aspect, hardware block, and the factor it enables

Activation queue and LNZD
Broadcast only non-zero activations, about 70% of them are zero after ReLU (the 3x factor); the FIFO of depth 8 adds load balance so PEs with more non-zeros do not stall the rest
Sparse matrix SRAM per PE
Every compressed weight lives in the PE's own SRAM, 131K weights per PE across 64 PEs, so no DRAM access happens during inference (120x, the largest factor)
Weight decoder in the datapath
A 4-bit codebook index is expanded to a 16-bit weight right before the multiplier, so memory holds indices and arithmetic sees real values (8x)
Address accumulator
Adds each 4-bit relative index to a running absolute row address, so only stored non-zeros are ever fetched or multiplied (10x from 10% weight density)

The FIFO deserves one extra sentence because it is easy to miss. Columns have different numbers of non-zeros, so PEs finish at different times. Han et al. swept the queue depth and found that at depth 1 some benchmarks lose about half their cycles to imbalance, while the gain flattens past depth 8, which is what they built. That is load balance bought with a few registers rather than with a different pruning pattern, and the retrospective will show why that trade did not scale.

Why on-chip SRAM is the whole story

The factors multiply, but they are far from equal. Table I of the EIE paper restates Horowitz's 45 nm energy table from ISSCC 2014, the same table lecture 04-1 opened with. A 32-bit integer add costs 0.1 pJ, a 32-bit integer multiply 3.1 pJ, a 32-bit SRAM cache read 5 pJ, and a 32-bit DRAM access 640 pJ. The caption says it plainly: DRAM uses three orders of magnitude more energy than simple arithmetic and 128x more than SRAM; the paper rounds this 128x table ratio to the 120x it uses in its energy breakdown. A multiplier that is twice as efficient saves picojoules. A weight that never leaves the chip saves hundreds of them, on every fetch, for every weight.

Six operations on a log axis. Arithmetic sits at the left, SRAM a little right of it, and DRAM two decades further out. The bracket is the 128x gap that the SRAM decision closes.

Pruning and weight sharing matter here for a reason that has nothing to do with arithmetic: they are what make the model small enough to fit. After compression, AlexNet's fully connected layers need about 131K weights per PE, and 64 PEs at 0.638 mm² each hold all of them. Memory takes 93% of a PE's area and 59% of its power, so EIE is, physically, an SRAM chip with a little arithmetic attached. The order of causes is the exam answer: compression makes the model fit on chip, fitting on chip removes DRAM, and removing DRAM is the 120x.

120×10×8×3=28,800×120 \times 10 \times 8 \times 3 = 28{,}800\times
Theoretical energy saving: SRAM instead of DRAM, weight sparsity, weight sharing, activation skipping

Worked example

From 28,800x on paper to 24,000x and 3,400x measured

  1. Multiply the four factors

    120 x 10 x 8 x 3 = 28,800x. Fetching from SRAM instead of DRAM is 120x; storing 10% of the weights is 10x; 4-bit indices instead of 32-bit weights is 8x; about 70% of activations are zero after ReLU, which the paper measures as 65% energy saved, roughly 3x.
  2. Compare with the measurements

    On the nine compressed layers EIE measures 24,000x better energy efficiency than the Core-i7 and 3,400x better than the Titan X (2,700x better than the Tegra K1).
  3. Explain the gap

    Han et al. say the saving against the GPUs is about 10x below theory (3,400x and 2,700x against 28,800x) for two reasons: index overhead (every 4-bit weight carries a 4-bit index, plus pointers) and process node, since EIE is 45 nm while the GPUs are 28 nm.
  4. Where the win comes from

    Factor removedProduct
    SRAM instead of DRAM (120x)10 x 8 x 3 = 240x
    Weight sparsity (10x)120 x 8 x 3 = 2,880x
    Weight sharing (8x)120 x 10 x 3 = 3,600x
    Activation skipping (3x)120 x 10 x 8 = 9,600x
    Drop one factor from 28,800x and see what remains
    Removing the SRAM factor collapses the product by two decades; removing any other factor leaves it in the thousands. DRAM elimination is most of the result.
SimulatorEnergy factor stack: which of EIE's four savings carries the result
Savings enabled
Theoretical saving28,800xproduct of the enabled factors; all four give 28,800x
Corrected estimate28,800xdivided by 1 + overhead
Theoretical product
28,800x
After overhead and node
28,800x
Measured vs CPU
24,000x
Measured vs GPU
3,400x
bars are on a log scale from 1x to 100,000x

The four factors and the measured 24,000x and 3,400x come from Han et al. (ISCA 2016), who attribute the gap to index overhead and to EIE's 45 nm process against the GPUs' 28 nm. The 1.6x node penalty is a rough teaching figure, not a number from the paper. Untick the SRAM factor and watch the product fall from 28,800x to 240x.

Quick check

In EIE, which unit decides which activations are broadcast to the PEs for the next layer?

Quick check

Which factor is the largest in EIE's 120 x 10 x 8 x 3 energy breakdown?

Recall

After the accumulators finish, what two steps make the layer output ready for the next layer?

ReLU on the destination activation registers, then leading non-zero detection, so that only the (value, index) pairs of non-zero activations are broadcast to the PEs for the next layer.

Recall

Which single design choice gives EIE most of its energy saving, and how large is that factor?

Keeping all compressed weights in on-chip SRAM instead of DRAM: 120x, because a 32-bit DRAM access costs 640 pJ against 5 pJ for SRAM in the Horowitz 45 nm table.

Take AlexNet's FC6 layer: a 4096 x 9216 matrix, 37.7 million weights. After pruning only 9% of the weights survive, and after ReLU only 35% of the input activations are non-zero. A multiply is needed only where a surviving weight meets a non-zero activation, which is 0.09 x 0.35, about 3.2% of the dense count. That is where the 33x FLOP reduction on the slide comes from.

FLOP reduction=1dweight×dactivation\text{FLOP reduction} = \frac{1}{d_{\text{weight}} \times d_{\text{activation}}}
Useful multiply-accumulates are the product of the two densities

The general rule is that the two sparsities multiply. Every layer in the benchmark set is a fully connected layer of a real model, and each one has its own pair of densities. Han et al. chose nine of them: three from AlexNet, three from VGG-16, and three from NeuralTalk, an RNN and LSTM image captioning model. The last three are the interesting outliers.

LayerSizeWeight densityActivation densityFLOP reductionModel
AlexNet-64096 x 92169%35%33xImage classification
AlexNet-74096 x 40969%35%33xImage classification
AlexNet-81000 x 409625%38%10xImage classification
VGG-64096 x 250884%18%100xImage classification
VGG-74096 x 40964%37%50xImage classification
VGG-81000 x 409623%41%10xImage classification
NeuralTalk-We600 x 409610%100%10xRNN and LSTM captioning
NeuralTalk-Wd8791 x 60011%100%10xRNN and LSTM captioning
NeuralTalk-LSTM2400 x 120110%100%10xRNN and LSTM captioning
The nine benchmark layers (Han et al., Table III)

Worked example

Checking the FLOP reduction column

  1. AlexNet-6

    1 / (0.09 x 0.35) = 31.7, reported as 33x. The paper first rounds the product of the densities to a whole percent (0.09 x 0.35 = 3.15%, listed as 3% in its FLOP column) and the slide reports 1 over that: 1 / 0.03 = 33x.
  2. VGG-6

    1 / (0.04 x 0.18) = 139, reported as 100x by the same route: 0.72% rounds to 1%, and 1 / 0.01 = 100x. VGG's first FC layer is the sparsest in both dimensions, and its 25088-wide input still fits the 64 PE design. The slide column is loosely rounded elsewhere too: VGG-8 (9%, so 11x) and the two 11% NeuralTalk rows (9x) all appear as 10x.
  3. NeuralTalk-We

    1 / (0.10 x 1.00) = 10x exactly. Activation density is 100% because LSTM gates use sigmoid and tanh, which never output exact zeros, so only weight sparsity helps.
  4. Result

    Activation sparsity is a free multiplier only for ReLU networks. For recurrent models the whole saving must come from pruning, which is why their reductions all sit at 10x.

What EIE was measured against

The comparison platforms were a desktop CPU (Intel Core-i7 5930k, running Intel MKL: CSRMV for the sparse model and GEMV for the dense one), a desktop GPU (NVIDIA Titan X, cuSPARSE CSRMV and cuBLAS GEMV), and a mobile GPU (the Tegra K1, measured on a Jetson TK1 developer board, which is the same silicon the slide names differently). Each baseline was given the best library available for its case, dense or sparse, so the comparison is against optimized software rather than naive loops.

On those nine layers EIE is 189x faster than the CPU and 13x faster than the GPU, while using 24,000x and 3,400x less energy respectively. The paper adds a number that is easy to forget and worth remembering: the same compressed model, run on the CPU or GPU with sparse libraries, gives only about 3x speedup over dense. Compression alone is not the win. Compression plus hardware built for it is.

Quick check

A NeuralTalk LSTM layer has 10% weight density and 100% activation density. What FLOP reduction does EIE see on it?

Recall

State the four headline numbers and what they compare.

189x and 13x faster than the CPU and GPU, and 24,000x and 3,400x more energy efficient, measured on nine compressed fully connected layers at batch size 1.

Look at the two right-most bars first. The fabricated EIE, 64 PEs at 45 nm, pushes 81,967 matrix-vector products per second through AlexNet FC7 at 0.59 W. DaDianNao, the strongest rival ASIC, reaches 147,938 per second but draws 15.97 W. Divide, and the picture flips: 138,927 frames per joule for EIE against 9,263 for DaDianNao, a 15x gap in EIE's favor at an older process node. The projected 256 PE version at 28 nm would reach 426,230 per second and 180,606 per joule.

PlatformNodeClassWeight memoryPowerThroughput (frames/s)Frames/J
Core-i7 5930K22 nmCPUDRAM73 W1622.22
GeForce Titan X28 nmGPUDRAM159 W4,11525.9
Tegra K128 nmMobile GPUDRAM5.1 W17333.9
A-Eye28 nmFPGADRAM9.63 W333.43
DaDianNao28 nmASICeDRAM15.97 W147,9389,263
TrueNorth28 nmASICSRAM0.18 W1,98910,839
EIE, 64 PEs45 nmASICSRAM0.59 W81,967138,927
EIE, 256 PEs (projected)28 nmASICSRAM2.36 W426,230180,606
Cross-platform comparison on AlexNet FC7 (Han et al., Table V; TrueNorth uses a TIMIT LSTM result instead)
The eight throughput bars on a log axis, growing in stagger with EIE last. DaDianNao is the one real rival in throughput; the dashed line marks the GPU so the decades above it are visible.

Worked example

Frames per joule from the table

  1. EIE, 64 PEs

    81,967 frames/s / 0.59 W = 138,927 frames/J.
  2. DaDianNao

    147,938 frames/s / 15.97 W = 9,263 frames/J, of which 6.12 W is eDRAM power alone.
  3. Same node, same PE count

    Han et al. also compare the projected 28 nm, 256 PE EIE with DaDianNao at its own node: 2.9x throughput, 19x energy efficiency and 3x area efficiency.
  4. Result

    In throughput EIE is competitive with the best ASIC; in energy it dominates every platform in the table, including the ASICs, and that is the column to argue from.

The reason energy is where EIE separates from the pack is the one from the previous concept, now visible across platforms. A matrix-vector product at batch size 1 is completely memory bound: every weight is used once, so throughput is set by how fast weights can be delivered, and energy by where they come from. DaDianNao's rate in the table is in fact a bandwidth estimate from its eDRAM (Han et al. compute 16 x 4 x 1024 bit / 8 x 606 MHz = 4,964 GB/s), A-Eye pulls every parameter from DDR3, and the CPU and GPUs all stream from DRAM. Only TrueNorth and EIE keep weights in SRAM, and TrueNorth pays for it with 1-bit weights and an asynchronous design measured on a different task.

Quick check

How much faster and more energy efficient than a desktop GPU did EIE report on compressed FC layers?

Recall

Why is the slide 74 chart not a like-for-like benchmark? Give at least three reasons.

The platforms span 22, 28 and 45 nm nodes; the 256 PE EIE bar is a projection; DaDianNao's throughput is estimated from its eDRAM bandwidth; and TrueNorth is measured on a different workload with 1-bit weights. Treat it as order-of-magnitude evidence.

Consider what a large language model does when it generates one token: it multiplies a single activation vector by weight matrices holding billions of parameters, reads every weight once, and does it again for the next token. That is a matrix-vector product at batch size 1, memory bound on weights, which is exactly the workload EIE was built for in 2016. So EIE's storage trick came back: keep weights in 4 bits, decode to 16, compute in 16. Han et al. call it W4A16 and point at GPTQ, AWQ, llama.cpp and MLC LLM, with one difference: today's engines use linear integer weights rather than a K-means codebook.

In 2023, for ISCA's 50th anniversary retrospective collection, the authors wrote down what they think held up and what did not. The slide condenses it to four pros and four cons. The tables below expand each line with the evidence the retrospective gives and the design that replaced or extended the idea.

ProEvidenceWhere it lives now
Special-purpose hardware pays off earlySparse operations stay cost-effective up to 50% density on EIE; sparse software libraries only win well below 1%Every commercial sparse NPU since
Both sparsities, cycles and energySkipping a zero weight saves the fetch; skipping a zero activation also saves the cycle that would have computed itNVDLA gates pruned weights, the Samsung NPU skips zero activations, Ambarella CV22 supports weight sparsity
Fine-grained sparsityIndividual weights can be removed, so pruning reaches higher ratios than any structured patternStill the highest-ratio option when hardware can afford it
W4A16Store 4-bit weights, decode to 16-bit and compute in 16-bit to keep accuracyGPTQ, AWQ, llama.cpp and MLC LLM for single-batch LLM decoding
What held up
ConWhy it hurtWhat replaced it
Hard on arrays of vector processorsIrregular non-zero positions cannot be fed to wide SIMD lanes or tensor coresStructured N:M sparsity in the Sparse Tensor Core (2:4), load-balance-aware pruning in ESE
Control and storage overheadPointer reads, CSC traversal and LNZD around a single MAC; a 4-bit index per 4-bit weight is 50% overheadCoarse-grained block sparsity
Fully connected layers onlyOne matrix-vector product at batch size 1; convolutions were out of scopeSCNN, Cambricon-X and Eyeriss v2 for sparse convolution; the M x V pattern itself returned in LLM decoding
Everything in SRAMFine for TinyML and vision models; 10 to 100 billion parameter LLMs do not fit (Cerebras tried this path)None named; the retrospective only notes that 10 to 100 billion parameter LLMs do not fit
What did not, and what replaced it

The con that matters most for the rest of this lecture

The first con is the one that shaped GPUs. A vector processor or a tensor core executes the same instruction on many lanes at once, so it needs each lane to have work at the same time. With irregular fine-grained sparsity, one lane may hold a non-zero and its neighbor a zero, and there is no way to line them up. EIE solved this with a private index stream per PE and a FIFO for load balance; ESE (FPGA 2017) went further with load-balance-aware pruning. NVIDIA instead changed the pattern itself: prune so that in every block of four consecutive weights exactly two are zero, a constraint called 2:4 sparsity. The Sparse Tensor Core then reads a 2-bit index per kept weight, selects the matching activations, and doubles math throughput with metadata overhead far below EIE's 50%. NVIDIA's recipe is to train dense, prune to 2:4 by magnitude, and retrain with the original hyperparameters. The next part takes this up in full.

A dense 4 x 4 block where each row keeps exactly two of four weights. The survivors slide into a compact 4 x 2 grid and each carries a 2-bit column index, the metadata a Sparse Tensor Core reads.

The second con is the index overhead you met in the energy gap: EIE stores a 4-bit index next to every 4-bit weight, and surrounds a single MAC with pointer reads, CSC traversal and the detector. Coarser granularity, whether 2:4 or whole blocks, amortizes that overhead. The third con, FC layers only, was answered by SCNN, Cambricon-X and Eyeriss v2 for sparse convolution. The fourth is a matter of scale: everything in SRAM is right for TinyML and vision models, and Cerebras pursued it commercially, but a model of 10 to 100 billion parameters does not fit.

Quick check

According to the retrospective, why did structured 2:4 sparsity replace EIE-style fine-grained sparsity on GPUs?

Recall

Name two things EIE could not accelerate and the designs that fixed them.

Convolution layers, later handled by SCNN, Cambricon-X and Eyeriss v2; and wide SIMD or tensor-core datapaths, handled by structured 2:4 sparsity in NVIDIA's Sparse Tensor Cores. Also acceptable: load imbalance, addressed by ESE's load-balance-aware pruning, and models too large for SRAM.

Edit one corner of a generated image and ask the model to redraw it. A dense pipeline recomputes every pixel. SIGE (NeurIPS 2022) computes only the edited region and reuses the rest. Nothing about this is specific to pruned weights, yet it is the same move EIE made: do not spend energy where the answer is already known to be zero or unchanged.

The retrospective states the move as a principle. The first principle of efficient AI computing is to be lazy: avoid redundant computation, quickly reject the work, or delay the work. Each of the four bullets on the slide is one of those three verbs applied to a different axis of the data, and reading them that way is more useful than memorizing four paper names.

WorkloadKind of sparsitySystemThe lazy move
Generative image editingSpatial sparsitySIGE (NeurIPS 2022)Recompute only the edited region
TransformersToken sparsity and progressive quantizationSpAtten (HPCA 2021)Prune unimportant tokens; fetch MSBs first, LSBs only if confidence is low
VideoTemporal sparsityTSM (ICCV 2019)Shift features across frames at zero FLOPs instead of 3D convolution
Point cloudsSpatial sparsityTorchSparse (MLSys 2022) and PointAcc (MICRO 2021)Compute only where points exist
Four workloads, four kinds of sparsity, one principle
  • Avoid redundant computation: SIGE skips unedited pixels; TSM replaces a 3D convolution over time with a shift that costs zero FLOPs.
  • Quickly reject the work: SpAtten prunes tokens and attention heads that contribute little, before they reach the expensive layers.
  • Delay the work: SpAtten's progressive quantization fetches the most significant bits first and only fetches the least significant bits when the attention scores are not yet confident.

The point-cloud line is the bridge to the last parts of this lecture. A LiDAR scan occupies a tiny fraction of its bounding volume, so sparse convolution computes only where points exist. TorchSparse makes that fast on a GPU and PointAcc builds the map generation into hardware. Notice that this is dynamic sparsity of the input, not static sparsity of the weights, which is the static versus dynamic split again: the hardware has to discover the sparsity on the fly, exactly as EIE's leading non-zero detector did for activations.

Recall

State the be-lazy principle and map each of its three verbs to one system from the slide.

Avoid redundant computation, quickly reject the work, or delay the work. Avoid: SIGE recomputes only edited regions, TSM shifts instead of convolving over time. Reject: SpAtten prunes unimportant tokens. Delay: SpAtten's progressive quantization fetches low-order bits only when confidence is low.

Recap

If you remember nothing else

  • After accumulation, ReLU and the LNZD network make the output sparse and broadcast only non-zero (value, index) pairs; the loop closes on chip.
  • All compressed weights sit in per-PE SRAM; SRAM at 5 pJ against DRAM at 640 pJ per 32-bit access (128x, which the paper rounds to 120x) is the biggest lever.
  • Theoretical saving 120 x 10 x 8 x 3 = 28,800x; measured 24,000x vs CPU and 3,400x vs GPU; speed 189x and 13x; batch size 1.
  • FLOP reduction equals 1 over (weight density times activation density); LSTM layers have 100 percent activation density.
  • The throughput chart mixes 22, 28 and 45 nm, a projection and a bandwidth estimate; read it as decades, not ratios.
  • What held up: co-design, both sparsities, on-chip weights and W4A16, which was reborn in LLM decoding.
  • What did not: FC only, batch 1, 50 percent index overhead, 16-bit datapath and irregular sparsity on SIMD; successors are SCNN, Cambricon-X, Eyeriss v2, ESE and 2:4 Sparse Tensor Cores.
  • The first principle is to be lazy: spatial, token, temporal and point-cloud sparsity all apply it.

Sources