Majid Al-RaimiLatency, throughput and energy

COE 592Lecture 03Part 01

Latency, throughput and energy

The efficiency triangle of storage, latency and energy, what latency and throughput each measure, why one does not imply the other, the analytical latency model, and why data movement dominates energy.

Concepts
5
Slides
1-9
Reading
30 min
Understood
0/5 concepts

Why this part matters

Your research project will put a detector on an embedded board, and the board will judge it by three costs that have nothing to do with accuracy: does the model fit, does it answer before the next frame arrives, and does it drain the battery. Every metric in this lecture exists to predict one of those three costs before you ever flash the board.

This part gives you the map and the first three costs. It fixes the vocabulary (latency, throughput, energy), shows why a latency number is meaningless without the conditions it was measured under, works the batching example that exams love, derives a one-line latency model that separates what the network controls from what the hardware controls, and ends with the energy table that explains why every efficient design of the last decade is really a design for moving fewer bytes. Parts 02 to 04 then fill in the metrics that feed these costs.

By the end you can

  1. Place any efficiency metric in the memory or computation group and say which of storage, latency and energy it predicts.
  2. Define latency and throughput, and compute both for a batched design.
  3. Explain with numbers why higher throughput does not imply lower latency, and lower latency does not imply higher throughput.
  4. Write Latency ≈ max(T_computation, T_memory) with its sub-formulas, label each term NN or hardware specification, and decide compute-bound versus memory-bound.
  5. Quote the 45 nm energy table and argue why data movement, not arithmetic, sets the energy bill of an inference.

Suppose the detector you trained in the cloud is to run on a Jetson-class board mounted on a vehicle. Before the board can use it, three separate questions must be answered. Does the model fit in the flash and RAM you have? Does one inference finish before the next camera frame lands, roughly every 33 ms at 30 frames per second? And how much charge does each inference pull from the battery? Slide 4 draws these as the three outer goals of a triangle, Smaller, Faster and Greener, and the three costs that quantify them: Storage, Latency and Energy.

The part of the triangle that matters is the middle. All three costs are driven by only two resources, Computation and Memory. Storage is purely a memory question: how many bytes the weights occupy. Latency and energy depend on both, because an inference both performs arithmetic and moves data, and each of those takes time and burns charge. That is why the metric list on the side of the slide has exactly two groups. The efficiency metrics that are memory-related are the number of parameters, the model size and the total and peak number of activations. The computation-related ones are MACs, FLOPs with their rate FLOPS, and OPs with their rate OPS.

Resources feed costs, costs feed goals. Memory wires into all three costs, computation into latency and energy. Hover Storage to see that only the memory metrics predict it.
GoalCostResourceMetrics that predict it
SmallerStorageMemory#parameters, model size
FasterLatencyComputation and memoryMACs, OPs, model size, peak #activations
GreenerEnergyComputation and memoryMACs, OPs, and above all the bytes moved
Each goal, the cost that quantifies it, the resource it draws on, and the metrics that predict it

This taxonomy is the spine of the whole lecture. Parts 02 and 03 fill the memory group (parameters, model size, activations), part 04 fills the computation group (MACs, FLOPs, OPs), and this part explains the three costs those metrics are meant to predict. Whenever a later metric appears, place it here first: which group is it in, and which cost does it feed?

Metrics you count versus costs you measure

One distinction keeps the rest of the part honest. Parameters and MACs are properties of the network alone. You can count them on paper from the layer shapes, and they do not change when you move the model to another chip. Latency, throughput and energy are properties of the network running on a specific processor with a specific runtime. They must be measured, or at least estimated from hardware numbers. The same split reappears in the latency model of concept 4 as NN specification versus hardware specification.

Quick check

In the efficiency triangle, which pair of resources drives all three of storage, latency and energy?

Recall

Name the two groups of efficiency metrics, list the members of each, and say which cost each group predicts.

Memory-related: #parameters, model size, total and peak #activations; they predict storage and the memory part of latency and energy. Computation-related: MAC, FLOP and FLOPS, OP and OPS; they predict the computation part of latency and energy.

Slide 5 shows the same Cityscapes street segmented twice. The two masks look almost identical, and by the usual accuracy metric they are: SegFormer-B5 reaches 82.4 mIoU and EfficientViT-L1 reaches 82.7 mIoU. The difference is time. SegFormer needs 638 ms per frame and EfficientViT needs 45.9 ms (the slide rounds to 46 ms). At 30 frames per second a new frame arrives every 33 ms, so one model falls nineteen frames behind for every frame it finishes, and the other almost keeps up.

That per-frame time is latency: the delay between starting one specific task and finishing it. Patterson and Hennessy call the same quantity response time or execution time, the time between the start and completion of a task. It is a property of one task, not of a stream of tasks, and the next concept shows why that restriction matters. The 13.9x gap (638 / 45.9) is exactly the headline of the EfficientViT paper, which reports up to 13.9x GPU latency reduction over SegFormer at the same or better accuracy (Cai et al., ICCV 2023).

ModelmIoUParametersMACsOrin latencyA100 throughput
SegFormer-B582.485M1460G638 ms12 image/s
EfficientViT-L182.740M282G45.9 ms122 image/s
Ratio+0.32.1x fewer5.2x fewer13.9x faster10x more
Both models on Cityscapes at 1024 x 2048, from Table 3 of the EfficientViT paper. Latency on Jetson AGX Orin at batch size 1, throughput on an A100.

Read the ratio row carefully, because it plants the seed for concept 4. The MAC count falls 5.2x, but latency falls 13.9x. If latency were simply proportional to arithmetic, the two ratios would match. They do not, because SegFormer's softmax attention moves large intermediate tensors through memory, and that data movement, not its MACs, is what makes it slow on an edge GPU. MACs alone do not predict latency; they are one input to it.

Four conditions every latency must state

The slide's footnote is not fine print. Latency is measured, so it depends on everything in the measurement. The paper's setup sentence names four things: the hardware, the runtime, the numeric precision and the batch size. Change any one of them and the number changes, sometimes by an order of magnitude. The same paper measures EfficientViT-B1 at 24.3 ms on Orin and 0.82 s on a Jetson Nano, and SegFormer-B1 at 146 ms on Orin and 5.6 s on Nano. Same model, same precision, same batch size, different board: 34x to 38x apart.

The measurement conditions behind slide 5

Hardware
NVIDIA Jetson AGX Orin: 2048-core Ampere GPU, 64 Tensor Cores at 43 dense FP16 TFLOPS (the CUDA cores alone give 10.6), 204.8 GB/s LPDDR5, 15 W to 60 W
Runtime
TensorRT, which NVIDIA describes as turning a trained model into a fast, GPU-specific program for inference; the speedup depends on the model, precision, batch size and GPU
Precision
fp16, half the bytes per weight and activation of fp32
Batch size
1, one image per inference, which is what an on-device detector sees

Quick check

Which set of conditions must accompany a reported latency for it to be comparable?

Recall

Define latency in one sentence and name the four conditions that slide 5 states for its numbers.

Latency is the delay to complete one specific task, here one segmentation of one frame. Conditions: hardware (Jetson AGX Orin), runtime (TensorRT), precision (fp16) and batch size (1).

Slide 6 replaces one street with two mosaics of video clips and asks a different question: not how long one clip takes, but how many clips get done per second. One system manages 6.1 videos per second, the other 77.4. Those two numbers come from Table 5 of the TSM paper (Lin, Gan and Han, ICCV 2019): I3D at 306 GFLOPs versus TSM8F at 33 GFLOPs, both on a single Tesla P100.

That rate is throughput: the amount of work completed per unit time, what Patterson and Hennessy also call bandwidth. The TSM paper is unusually helpful here because it states its protocol: latency was measured with batch size 1 and throughput with batch size 16. TSM8F's latency is 17.4 ms. If throughput were the reciprocal of latency you would expect 1000 / 17.4 = 57.5 videos per second, yet the paper reports 77.4. The extra comes from batching, and it is the whole point of slide 7.

throughput=bTbatch,latency=Tbatch\text{throughput} = \frac{b}{T_{\text{batch}}}, \qquad \text{latency} = T_{\text{batch}}
b inputs processed together in one batch that takes T_batch

Two designs, same processor, opposite answers

Slide 7 pits two designs against each other. Design 1 handles one image at a time and takes 50 ms per image. Design 2 takes four images together and finishes the whole group in 100 ms. Each image in Design 2 waits the full 100 ms, because nothing leaves the processor until the batch is done.

DesignHow images are handledPer-image latencyImages per batchBatch timeThroughput
Design 1One after another50 ms150 ms1 / 0.050 = 20 image/s
Design 2Four in parallel100 ms4100 ms4 / 0.100 = 40 image/s
Slide 7's two designs
Both lanes run for the same 200 ms. Design 1 finishes four images in four 50 ms steps. Design 2 finishes eight in two 100 ms steps, yet every one of its images waited twice as long.

Worked example

Answering slide 7's two questions

  1. Does higher throughput mean lower latency?

    No. Design 2 has twice the throughput (40 versus 20 image/s) and twice the latency (100 versus 50 ms). Batching raised both, because throughput counts images and latency counts the wait of one image, and that image waits for its whole batch.
  2. Does lower latency mean higher throughput?

    No. Design 1 has half the latency and half the throughput. With no parallelism, a fast single lane still moves only one image per step, so a short step buys a short wait but not a high rate.
  3. When the two coincide

    Throughput equals 1 / latency only when the batch size is 1 and nothing is pipelined or run in parallel. Any batching or parallelism breaks the identity, always in the direction of more throughput per unit of latency.
SimulatorLatency versus throughput under batching
images done at 1000 ms: 40
Latency per image100msevery image waits for its whole batch, so L = t_batch
Throughput40.0image/s4 / 100 ms
1 / latency10.0per sonly equals throughput when b = 1

Batching multiplies throughput by b = 4 (4x the reciprocal of latency) while latency stays at 100 ms for every image. In one 1 s window this design completes 10 whole batches, 40 images. The TSM preset back-computes its batch time from the paper's 77.4 video/s at batch 16, so it illustrates the arithmetic rather than confirming it.

A second scenario for practice

A cloud server serves the same model at two batch sizes. At batch 1 a request takes 2 ms. At batch 32 the whole batch takes 8 ms, because the GPU can spread thirty-two images over its cores far more efficiently than one.

SettingBatch timeImages per batchLatency per imageThroughput
Batch 12 ms12 ms500 image/s
Batch 328 ms328 ms4000 image/s
Change4x longer32x more4x worse8x better
One server, two batch sizes

Batching paid 4x latency to buy 8x throughput. Whether that is a good trade depends on who is waiting. A brake camera needs one frame answered now: latency, at batch size 1, which is why slide 5 measured that way. A data center indexing videos overnight needs clips per hour: throughput, at whatever batch size fills the GPU. Your research project sits on the first side of that line.

Quick check

Design 2 processes 4 images in parallel in 100 ms. What are its latency and throughput?

Recall

A design processes 8 images together every 200 ms. What are its latency and throughput, and what would the naive reciprocal give?

Latency 200 ms per image. Throughput 8 / 0.2 = 40 image/s. The reciprocal 1 / 0.2 = 5 per second is wrong by the batch size.

Concept 2 left a puzzle: MACs fell 5.2x but latency fell 13.9x. To resolve it you need a model of where the milliseconds go. Watch one layer execute. The processor loads the input activations, loads the layer's weights, multiplies and accumulates, and stores the output activations. Two of those steps are arithmetic; the other two are data movement. Real hardware does not wait for one to finish before starting the other. While the multipliers chew on the current tile, the memory system is already fetching the next weights, so the two streams run side by side and the layer finishes when the slower stream finishes.

Data movement and computation run on parallel tracks. The memory track sits idle while the multipliers catch up and stores the last outputs only after the last MAC, so the layer takes as long as the busier track, which is why the estimate is a max and not a sum.
Latencymax(Tcomputation,  Tmemory)\text{Latency} \approx \max\left(T_{\text{computation}},\; T_{\text{memory}}\right)
The two overlapped streams
Tcomputationnumber of operations in the modeloperations per second the processor can doT_{\text{computation}} \approx \frac{\text{number of operations in the model}}{\text{operations per second the processor can do}}
NN specification over hardware specification
TmemoryTmove(activations)+Tmove(weights)T_{\text{memory}} \approx T_{\text{move}}(\text{activations}) + T_{\text{move}}(\text{weights})
Both kinds of data must cross the same memory bus, so these add
Tmove(weights)model sizememory bandwidth,Tmove(activations)input activation size+output activation sizememory bandwidthT_{\text{move}}(\text{weights}) \approx \frac{\text{model size}}{\text{memory bandwidth}}, \qquad T_{\text{move}}(\text{activations}) \approx \frac{\text{input activation size} + \text{output activation size}}{\text{memory bandwidth}}
Bytes over bytes per second

Computation time is the operation count divided by the rate at which the processor retires operations. Memory time is the bytes that must move divided by the memory bandwidth, once for the weights and once for the activations in and out. Now look at the colour coding on the slide, because it is the sentence the exam wants. Every numerator is a property of the network: operations, model size, activation sizes. Every denominator is a property of the processor: operations per second, bandwidth. That split is the NN specification versus hardware specification distinction, and it makes efficiency a co-design problem. You change numerators by redesigning the network, denominators by choosing hardware, and latency by whichever of the two you can actually afford to change.

TermNumerator: NN specificationDenominator: hardware specification
T_computationNumber of operations in the model (MACs, OPs: part 04)Operations per second of the processor (OPS)
T_move(weights)Model size (part 02)Memory bandwidth
T_move(activations)Input activation size + output activation size (peak #activations: part 03)Memory bandwidth
Where each term of the model comes from, and which later part counts it

The same model appears in the industry literature under different names. NVIDIA's GPU performance guide states that memory time is bytes accessed divided by memory bandwidth, math time is operations divided by math bandwidth, and the longer of the two shows what limits performance: math-limited if math time is longer, memory-limited if memory time is longer. The roofline model of Williams, Waterman and Patterson (CACM 2009) writes the same idea as a rate, attainable performance = min(peak compute, bandwidth x operational intensity). The vocabulary to adopt is compute-bound when T_computation wins and memory-bound when T_memory wins. One caution before using datasheet numbers: dividing by a peak OPS figure gives a floor on T_computation, not an estimate of it, because real kernels rarely keep every multiplier busy. The measured time over that floor is the inverse of the utilisation the runtime achieved.

Worked example A: a toy model and two processors

Worked example

Toy numbers that show the regime flipping

  1. Start on a 100 GOPS processor

    The model has 1 GOP of work, so T_computation = 1e9 / 1e11 = 10 ms. Weights are 50 MB and activations in plus out are 20 MB, over 10 GB/s: T_weights = 5 ms, T_activations = 2 ms, T_memory = 7 ms. Latency ≈ max(10, 7) = 10 ms, compute-bound.
  2. Buy a 200 GOPS processor

    T_computation halves to 5 ms, but T_memory is still 7 ms. Latency ≈ max(5, 7) = 7 ms, not 5 ms. The model became memory-bound and 2 ms of the new compute sits idle every inference.
  3. Quantize the weights to 8-bit instead

    Model size drops to 12.5 MB (part 02 shows why), so T_weights = 1.25 ms and T_memory = 3.25 ms. On the fast processor latency is back to max(5, 3.25) = 5 ms: the hardware upgrade only paid off once the network side shrank too.
  4. Three configurations

    ConfigurationT_computationT_memoryLatencyRegime
    100 GOPS, 32-bit weights10 ms5 + 2 = 7 ms10 msCompute-bound
    200 GOPS, 32-bit weights5 ms5 + 2 = 7 ms7 msMemory-bound
    200 GOPS, 8-bit weights5 ms1.25 + 2 = 3.25 ms5 msCompute-bound
ModelLatency as max(T_computation, T_memory)
light symbols are NN specification (numerators), teal symbols are hardware specification (denominators)
T_computation = N_ops / OPS10.0 ms
T_memory = T_weights + T_activations7.00 ms
T_weights = S_w / BW = 5.00 msT_activations = (S_in + S_out) / BW = 2.00 ms
Latency estimate10.0 msmax of the two bars
Regimecompute-bounda faster processor would help
Headroom1.43xhow much T_memory could grow before it becomes the bottleneck

The two Orin presets use 43 TFLOPS dense fp16 on the Tensor Cores and 204.8 GB/s from NVIDIA's Jetson AGX Orin page, MACs and parameters from the EfficientViT paper, and a 1024 × 2048 input with 19 output classes at 2 bytes each. Dividing by a peak rate gives a floor: measured latencies were 45.9 ms and 638 ms, 3.5x and 9.4x above it, and the gap shows what a first-order model leaves out.

Worked example B: back to slide 5

Worked example

Predicting the Orin numbers from public specifications

  1. EfficientViT-L1, computation

    282 GMACs is 564 GFLOPs at two FLOPs per MAC (part 04). TensorRT runs fp16 convolutions and matrix multiplies on the Tensor Cores, which the Orin page rates at 43 dense FP16 TFLOPS (the CUDA cores alone would give 10.6), so T_computation ≈ 564 / 43 000 ≈ 13.1 ms.
  2. EfficientViT-L1, memory

    Weights: 40M x 2 bytes = 80 MB, over 204.8 GB/s gives 0.39 ms. Activations: input 3 x 1024 x 2048 x 2 B = 12.6 MB, output 19 x 1024 x 2048 x 2 B = 79.7 MB, sum 92.3 MB, over the same bandwidth 0.45 ms. T_memory ≈ 0.84 ms.
  3. Compare with measurement

    Prediction max(13.1, 0.84) ≈ 13.1 ms, strongly compute-bound. Measured: 45.9 ms, 3.5x above the floor, so the runtime achieved roughly 29% of the Tensor Core peak. That is a normal utilisation for a real network: kernel launches, layers too small to fill the GPU, and intermediate activations moving between layers all sit outside the formula.
  4. SegFormer-B5 by the same recipe

    1460 GMACs = 2920 GFLOPs, so T_computation ≈ 2920 / 43 000 ≈ 68 ms. Weights 85M x 2 B = 170 MB give 0.83 ms; the activations are the same 0.45 ms. Prediction ≈ 68 ms. Measured: 638 ms, 9.4x above the floor, about 11% utilisation.
  5. Reading the two misses

    Both models land above the floor, as every real model does, but SegFormer misses by almost three times as much. The crude model counts only input and output activations. SegFormer's softmax attention materializes large intermediate attention maps that the formula never sees, which is exactly the memory traffic the EfficientViT paper set out to remove. The model is a first-order floor; the size of the miss tells you which term you forgot.
  6. Floor versus measurement

    ModelT_computationT_memoryFloorMeasuredMiss, utilisation
    EfficientViT-L1564 / 43 000 = 13.1 ms0.39 + 0.45 = 0.84 ms13.1 ms45.9 ms3.5x, about 29%
    SegFormer-B52920 / 43 000 = 68 ms0.83 + 0.45 = 1.3 ms68 ms638 ms9.4x, about 11%

Quick check

A model is memory-bound on its current processor. Which change is guaranteed to reduce its latency under the max model?

Recall

Write the latency model with its sub-formulas and label every term NN or hardware.

Latency ≈ max(T_computation, T_memory). T_computation ≈ operations in the model (NN) / operations per second (hardware). T_memory ≈ model size (NN) / bandwidth (hardware) + (input + output activation size) (NN) / bandwidth (hardware).

Recall

Why max and not plus?

Data movement and computation overlap on real hardware: the next weights load while the current ones are being multiplied. The layer therefore finishes when the slower of the two streams finishes, which is the max.

Recall

In the SegFormer versus EfficientViT comparison, MACs drop 5.2x but latency drops 13.9x. What does that tell you?

MACs are only the numerator of T_computation. SegFormer's attention moves large intermediate activations, so a memory term the simple model ignores inflates its latency, and operation count alone under-predicts it.

The third cost is energy, and slide 9 settles where it goes with one table. In a 45 nm process at 0.9 V, a 32-bit integer add costs 0.1 pJ and a 32-bit integer multiply 3.1 pJ. Reading one 32-bit word from DRAM costs 640 pJ. The multiply is the most expensive arithmetic on the list, and the memory access is two hundred times dearer than it.

Rough energy per operation, 45 nm, 0.9 V, 32-bit (slide 9, after Horowitz 2014 as tabulated by Han et al. 2015)

int ADD
0.1 pJ
float ADD
0.9 pJ
Register file access
1 pJ
int MULT
3.1 pJ
float MULT
3.7 pJ
SRAM cache access
5 pJ
DRAM memory access
640 pJ
On a log axis each grid step is ten times more energy. The six arithmetic and on-chip bars fit in the first two decades; DRAM sits two more decades out from SRAM (640 / 5 = 128x) and almost four decades from the int ADD bar.

Three ratios from that table are worth memorizing. DRAM over integer multiply is 640 / 3.1 ≈ 206, which the slide rounds to 200x. DRAM over SRAM is 640 / 5 = 128, so keeping data on-chip is worth two orders of magnitude on its own. And float add over integer add is 0.9 / 0.1 = 9, a seed for quantization: the same arithmetic in integers is nine times cheaper per add. Han et al. summarize the whole table in one line, that memory access is three orders of magnitude more energy expensive than simple arithmetic (640 / 0.1 = 6400).

The chain the slide writes across the top follows directly: data movement means more memory references, and more memory references mean more energy. Horowitz's own framing in the ISSCC 2014 talk is that a DRAM access at 1 to 2 nJ is a couple of orders of magnitude above a cache access or a functional operation at around 10 pJ, and that even with better I/O circuits DRAM will stay expensive, around 0.6 nJ per 8 bytes, because requests and data still have to travel a long physical distance. The slide's 640 pJ per 32-bit word is about half of the 1.3 nJ per 64-bit access in his Figure 1.1.9, as the provenance note below explains.

The log axis of the slide's chart is not decoration either. On a linear axis the six small bars would be invisible next to DRAM; a 0.1 pJ bar next to a 640 pJ bar is a pixel next to a page. Only a logarithmic axis can show both, and it is the honest way to read any table whose entries span four decades.

Worked example: AlexNet's energy bill

Worked example

Arithmetic versus weight fetch for one AlexNet inference

  1. Arithmetic in 32-bit integers

    AlexNet runs 724M MACs per image (part 04). Each is one multiply and one add: 724e6 x (3.1 + 0.1) pJ = 2.32 mJ.
  2. Weights read once from DRAM

    AlexNet has 61M parameters (part 02). Reading each once as a 32-bit word: 61e6 x 640 pJ = 39.0 mJ. That is 16.8x the arithmetic, before a single activation has moved.
  3. Two alternatives

    Keep the same weights in SRAM: 61e6 x 5 pJ = 0.31 mJ, cheaper than the arithmetic. Or keep DRAM but use float arithmetic: 724e6 x (3.7 + 0.9) = 3.33 mJ, still twelve times below the DRAM bill.
  4. Two orders of magnitude versus a factor of two

    Changing where the weights live changes the total by two orders of magnitude; changing how the arithmetic is done changes it by less than a factor of two.
  5. The bill, line by line

    ItemCountEnergy eachTotal
    Integer MACs (multiply + add)724M3.1 + 0.1 = 3.2 pJ2.32 mJ
    Weights read once from DRAM61M640 pJ39.0 mJ
    Same weights read from SRAM61M5 pJ0.31 mJ
    Float MACs instead of integer724M3.7 + 0.9 = 4.6 pJ3.33 mJ
CalculatorEnergy of one inference, operation by operation
1,000,000 × 0.1 pJ
100 nJ
0 × 0.9 pJ
0.0 pJ
0 × 1 pJ
0.0 pJ
1,000,000 × 3.1 pJ
3.10 µJ
0 × 3.7 pJ
0.0 pJ
100,000 × 5 pJ
500 nJ
10,000 × 640 pJ
6.40 µJ
bars use a log scale from 1 pJ to the largest row, so equal steps are ten times more energy
linear share of the total: light is arithmetic, teal is memory access
Total energy10.1 µJ
Arithmetic3.20 µJadds and multiplies
Memory access6.90 µJDRAM alone: 63% of total

Per-operation costs are the 45 nm, 0.9 V figures from slide 9 (Horowitz 2014, as tabulated by Han et al. 2015). The AlexNet presets use 724M MACs as one multiply plus one add each, and one fetch per weight for its 61M weights.

Every efficiency technique later in the course can be read as a way of cutting that memory line. Keep weights in on-chip SRAM, which is 128x cheaper per access than DRAM. Reuse each fetched value as many times as possible before it leaves the chip; Horowitz notes that efficient designs complete on the order of a thousand operations per DRAM fetch. And make the model small enough to fit on-chip in the first place, which is what model size in part 02, peak activations in part 03, and pruning and quantization later in the course are all about.

Quick check

In the 45 nm table, how does one 32-bit DRAM access compare with one 32-bit integer multiply?

Recall

Quote the DRAM to integer multiply energy ratio, the numbers behind it, and the process conditions.

640 pJ / 3.1 pJ ≈ 206, quoted as 200x. Conditions: 45 nm, 0.9 V, 32-bit operations, Horowitz ISSCC 2014 via Han et al. 2015.

Recall

For one AlexNet inference, how does the energy of fetching every weight once from DRAM compare with the energy of all its integer MACs?

61M x 640 pJ = 39 mJ for the weights against 724M x 3.2 pJ = 2.3 mJ for the arithmetic, about 17x. Moving the weights to SRAM drops the fetch cost to 0.31 mJ.

Recap

If you remember nothing else

  • Three goals (smaller, faster, greener) map to three costs (storage, latency, energy). All three are driven by two resources, computation and memory, so the metrics split into memory-related and computation-related.
  • Latency is the delay for one task. SegFormer-B5 takes 638 ms and EfficientViT-L1 takes 45.9 ms on Jetson AGX Orin with TensorRT, fp16, batch size 1: a 13.9x gap at equal or better mIoU.
  • A latency number without hardware, runtime, precision and batch size is not comparable to any other.
  • Throughput is items per second. Batching raises it (Design 2: 40 image/s) while raising latency (100 ms). Throughput equals 1 / latency only with batch size 1 and no parallelism.
  • Latency ≈ max(T_computation, T_memory) because data movement and computation overlap. Numerators are NN specification, denominators are hardware specification.
  • A faster processor helps only when compute-bound. A memory-bound model needs smaller weights, smaller activations or more bandwidth.
  • At 45 nm and 0.9 V: int ADD 0.1 pJ, int MULT 3.1 pJ, SRAM 5 pJ, DRAM 640 pJ. One DRAM access costs about 206 int multiplies, and a float ADD costs 9 int ADDs.
  • Fetching AlexNet's 61M weights once from DRAM (39 mJ) costs about 17 times its 724M MACs of integer arithmetic (2.3 mJ).

Sources