Majid Al-RaimiCloud and edge AI hardware, and the gap between them

COE 592Lecture 01Part 03

Cloud and edge AI hardware, and the gap between them

How NVIDIA data center GPUs, mobile NPUs, Jetson modules and microcontrollers compare in performance, power and memory, and why the orders-of-magnitude gap from cloud to tiny devices demands efficient models.

Concepts
4
Slides
17-24
Reading
24 min
Understood
0/4 concepts

Why this part matters

Part 02 measured demand: models grew from 0.05B to 530B parameters and diffusion cost rises faster than the square of resolution. This part measures supply. What can a cloud GPU, a phone, a robot module and a microcontroller actually hold and compute, and how far apart are they?

The answer is a set of numbers you will use twice. In the exam, they appear as short computations: TOPS per watt for a given GPU, or the ratio between two memory tiers. In your research project, they are the sizing step that comes before any model is designed: the target tier fixes the memory and power budget, and the budget decides which of the techniques in the rest of this course you will need. By the end of the part the phrase "six orders of magnitude" should feel concrete rather than rhetorical.

By the end you can

  1. Read a GPU spec sheet: define TOPS (dense versus sparse), memory bandwidth and TDP, and compute TOPS per watt for any of the five NVIDIA generations.
  2. Explain the memory wall: why 94x more compute on 2.8x more power and 12x more memory makes data movement, not arithmetic, the bottleneck.
  3. Contrast edge accelerator families: a fixed power envelope (Snapdragon, Apple) versus a power ladder (Jetson), and say why TOPS across vendors are not comparable.
  4. Describe a microcontroller, read DMIPS correctly, and state the 320 kB and 1 MB budgets of the STM32F746.
  5. Compute the cloud, mobile and tiny AI ratios, separate activation memory from weight storage, and decide whether a given model fits each tier.

A single NVIDIA A100 from 2020 performs 312 trillion dense FP16 operations per second and draws 400 W. Four years earlier the P100 managed 18.7 trillion at 250 W. That is a 17x jump in throughput. How much of it came from simply burning more power? Only 1.6x (400 / 250). The other 10x came from architecture: Tensor Cores, faster HBM2e and a 7 nm process node. That single observation is the whole story of the cloud tier, and the rest of this concept just extends it across five generations.

Slide 17 repeats the three pillars from part 01 to mark the pivot: algorithm and data were the first two, and now we ask whether the third, hardware, can absorb the demand growth by itself. Slide 18 answers with four charts for the NVIDIA data center GPU line: P100, V100, A100, H100 and B100: the P100 as a PCIe card (as the errata below explains) and V100 to B100 in the SXM mezzanine form factor used in HGX and DGX servers, which allows a higher power budget than a PCIe card. The four series are performance, memory bandwidth, power and memory capacity, and the lesson lives in how differently they grow.

Reading the vertical axis: what a TOPS is

TOPS stands for trillions of operations per second. The unit hides two conventions you must know. First, one multiply-accumulate counts as two operations (one multiply, one add), so the MAC counts from part 01 convert with a factor of two. Second, NVIDIA quotes Tensor Core throughput at a specific precision, here FP16, and its spec sheets list two numbers: a dense figure and a figure "with sparsity" that is exactly double. The doubled number applies only when the weights have been pruned to a 2:4 structured pattern (two of every four values zero). The slide uses the dense figures, and so should you when comparing chips. The A100 page reads 312 TFLOPS dense and 624 TFLOPS with sparsity; the H100 SXM lists 1,979 sparse, which is 989 dense, rounded to 990 on the slide (NVIDIA A100 and H100 pages).

TOPS=2×MACs per second1012\text{TOPS} = \frac{2 \times \text{MACs per second}}{10^{12}}
One MAC is a multiply plus an add, so two operations
TOPS/W=peak TOPSboard power (W)\text{TOPS/W} = \frac{\text{peak TOPS}}{\text{board power (W)}}
Efficiency, not speed

Five generations, four very different slopes

PartDense FP16 TOPSBandwidth GB/sPower WMemory GBTOPS/W
P100 (2016), PCIe18.7732250160.075
V100 SXM (2017)125900300320.42
A100 SXM (2020)3122,039400800.78
H100 SXM (2022)9903,430700961.41
B100 SXM (2024)1,7508,1927001922.5
Five NVIDIA data center GPUs (slide 18 values, TOPS per watt computed)
TOPS bars climb a log scale by 94x while the watt bars beside them rise only 2.8x on a linear scale

Growth from P100 (2016) to B100 (2024)

Performance, dense FP16
18.7 to 1,750 TOPS, about 94x
Board power
250 to 700 W, 2.8x
Memory capacity
16 to 192 GB, 12x
Memory bandwidth
732 to 8,192 GB/s, about 11x
TOPS per watt
0.075 to 2.5, about 33x

Read the table as a race between four quantities. Compute ran 94x. Efficiency ran 33x, which is why compute could run so far on so little extra power. Capacity and bandwidth ran only about 12x. So every generation, the arithmetic units can chew through data faster than the memory can deliver it, by a margin that widens each time.

Two-decade growth rates of the three resources (Gholami et al., 2024)

Peak server FLOPS
3.0x every two years
DRAM bandwidth
1.6x every two years
Interconnect bandwidth
1.4x every two years

Gholami and colleagues measured those three rates over two decades of FLOPS, DRAM bandwidth and interconnect bandwidth, and they conclude that memory, not compute, is now the primary bottleneck for AI serving (Gholami et al., 2024). They call it the memory wall.

Why bandwidth matters: the memory wall

Every inference streams weights and activations from the GPU's high-bandwidth memory (HBM) into the compute units. Memory bandwidth is the rate of that stream. If the chip can do 990 trillion operations per second but fetch only 3.35 trillion bytes per second, then it must perform about 295 operations on every byte it fetches to stay busy. A layer that does less arithmetic per byte than that sits idle, waiting for memory. The threshold is called the arithmetic intensity a workload needs to be compute bound.

Worked example

Compute versus bandwidth on an H100

  1. Operations available per second

    990 × 10^12 dense FP16 operations per second (NVIDIA H100 page, dense half of 1,979).
  2. Bytes available per second

    3.35 × 10^12 bytes per second from HBM3 (NVIDIA's figure for the 80 GB part; the slide plots 3,430).
  3. Break-even intensity

    990 / 3.35 ≈ 295 operations per byte. Below this, memory bounds the chip; above it, compute does.
  4. Compare with LLM decoding

    Generating one token of an LLM touches every weight once. Each FP16 weight is 2 bytes and does one MAC, so about 2 operations per 2 bytes, roughly 1 operation per byte at batch size one.
  5. Result

    About 1 operation per byte against a 295 threshold. Single-stream decoding uses well under one percent of the H100's arithmetic; bandwidth sets the token rate. This is a simplified roofline argument that ignores caches and batching, but the conclusion holds for serving.

Tie back to the LLM curve: capacity, not TOPS, sets the minimum machine

Part 02 ended with model size outrunning GPU memory. Put the two lines together. Megatron-Turing NLG has 530 billion parameters (Smith et al., 2022). GPU memory grew 12x over the eight years from 2016 to 2024; in roughly half that time, from the Transformer of 2017 to MT-NLG in 2021, LLM size grew from 0.05B to 530B, about 10,000x. The hardware pillar cannot close that by itself.

Worked example

How many GPUs hold MT-NLG's weights

  1. Bytes of weights at FP16

    530 × 10^9 parameters × 2 bytes = 1.06 × 10^12 bytes = 1.06 TB.
  2. A100 80 GB cards

    1.06 TB / 80 GB = 13.25, so 14 cards before a single activation is stored.
  3. B100 192 GB cards

    1.06 TB / 192 GB = 5.5, so 6 cards. Four years of hardware progress cut the count by about 2.4x; the model side must do the rest.
  4. Result

    Memory capacity, not TOPS, decides the smallest machine that can even load the model.

Recall

Compute TOPS per watt for the A100 and the B100 from the slide values. How much did efficiency improve?

A100: 312 / 400 = 0.78 TOPS/W. B100: 1,750 / 700 = 2.5 TOPS/W. About 3.2x better efficiency in four years.

Recall

Performance grew 94x from P100 to B100. By how much did power and memory grow, and what does that imply?

Power 2.8x (250 to 700 W) and memory 12x (16 to 192 GB). Compute outran both, so the cost of moving data to the compute units (the memory wall) becomes the limit, especially for memory-bound work such as LLM decoding.

Quick check

From P100 (2016) to B100 (2024), dense FP16 performance grew about 94x. By roughly how much did board power grow?

Quick check

An H100 is rated 990 dense FP16 TOPS, but single-stream LLM token decoding runs far below that. What is the most likely limiter?

Quick check

What does the word dense mean in NVIDIA's dense FP16 TOPS figure?

The Snapdragon 845 of 2018 delivered 3 TOPS at about 9 W. The Snapdragon 8 Gen 1 of 2022 delivers 52 TOPS at about 10 W. Seventeen times the performance, essentially no extra power. Why is the power line flat when the cloud line climbed to 700 W? Because a phone is a sealed slab held against skin with no fan. Its sustained power is capped by heat, not by engineering ambition, so every gain must come from efficiency. That is the rule for the whole edge tier: the power envelope is the constraint, and performance per watt is the design metric.

Slides 19 to 21 show three families that each obey this rule in their own way. The Qualcomm Hexagon DSP and the Apple Neural Engine live inside phones and share a lid near 10 W. NVIDIA Jetson modules live in robots and industrial boxes that have a fan and a battery budget, so their power is allowed to climb with each tier. Explore all three, and the cloud and microcontroller tiers, before reading on.

SimulatorDevice picker: performance, power and memory by tier

NVIDIA data center, dense FP16 TOPS (slide 18)

PerformanceTOPS
18.71253129901,750
PowerW
250300400700700
MemoryGB
16328096192
Performance18.7TOPS
Power250W
Memory16GB
Efficiency0.075TOPS/Wperformance divided by power
First to last in this family
Performance 93.6xPower 2.8xMemory 12xEfficiency 33.4x

Values are the slide figures. Compare within one family only: cloud numbers are dense FP16, Jetson Xavier and Orin are INT8 (Orin sparse) while Nano and TX2 are FP16 FLOPS, Qualcomm sums INT8 across CPU, GPU and Hexagon, Apple states no precision, and MCUs are rated in integer DMIPS, which is not an operations-per-second figure at all.

Qualcomm Hexagon: seventeen times the work under the same lid

Hexagon began as a digital signal processor for audio and camera pipelines. Qualcomm turned it into what its Snapdragon 888 brief calls a "fused AI-accelerator architecture": a tensor accelerator, vector extensions and a scalar unit sharing memory, supporting INT8, INT16 and FP16. The brief claims 26 TOPS for the whole AI Engine and "up to 3 times performance per watt improvement" over the 865; the 8 Gen 1 brief claims "up to 4x faster" and "best performance-per-watt in Snapdragon history" (Qualcomm product briefs). Notice the vendor language: every headline is a ratio to power. The products on the slide are the Qualcomm Robotics RB5 platform (865 class, 15 TOPS), the Galaxy Tab with the 888+ and the Galaxy Z Fold with the 8+ Gen 1.

PartTOPSPower WMemory GBTOPS/W
Snapdragon 8453940.33
Snapdragon 85571080.70
Snapdragon 8651510121.5
Snapdragon 8882610162.6
Snapdragon 8 Gen 15210165.2
Snapdragon Hexagon (slide 19 values, TOPS per watt computed)
Five Hexagon generations grow 17x in TOPS while a thermal lid at about 10 W never moves

Worked example

Why the phone line is flat

  1. Thermal budget

    A fanless phone can sustain roughly 10 W before the case gets too hot to hold, so that number is fixed by physics, not by the chip roadmap.
  2. Efficiency of the endpoints

    Snapdragon 845: 3 / 9 = 0.33 TOPS/W. Snapdragon 8 Gen 1: 52 / 10 = 5.2 TOPS/W.
  3. Ratio

    5.2 / 0.33 ≈ 16x efficiency, which is 17x performance divided by 1.1x power.
  4. Result

    All of the gain is efficiency. Under a fixed lid, TOPS per watt is the only lever.

Apple Neural Engine: the same lesson from a different vendor

Apple describes the Neural Engine as an energy-efficient, high-throughput engine for ML inference on its own silicon. Its newsroom gives the per-generation numbers the slide plots: 600 billion operations per second for the A11 in 2017, 5 trillion for the A12, 11 trillion for the 16-core A14, 15.8 trillion for the A15 and "nearly 17 trillion" for the A16 (Apple Newsroom). The A17 Pro's 35 TOPS comes from Apple's 2023 event rather than the newsroom text, which only says "up to 2x faster". The products on the slide span an iPhone (A14), an iPad (A15) and an iMac with the M1 Max, the same engine design scaled up.

ChipTOPSPower WMemory GBTOPS/W
A11 (2017)0.6830.075
A12 (2018)5640.83
A13 (2019)6641.0
A14 (2020)11661.83
A15 (2021)15.8662.63
A16 (2022)17862.13
A17 Pro (2023)35not plotted8not computable
Apple Neural Engine (slide 20 values, TOPS per watt computed)

From A11 to A17 the engine gained about 58x in throughput while the estimated power sat between 6 and 8 W. Two vendors, two architectures, one shape: a rising performance line under a flat power line.

NVIDIA Jetson: a ladder instead of a lid

A Jetson is a complete system on module: GPU, CPU, memory, power management and high-speed interfaces on one board that plugs into a carrier. It targets robots, drones and industrial edge boxes, and those have what a phone lacks: a fan and a battery or wall power. So NVIDIA sells a ladder of tiers, each with a configurable power range, and the slide plots the top of each range: Nano at 5 to 10 W, TX2 at 7.5 to 15 W, Xavier NX at 10 to 20 W, AGX Xavier at up to 30 W, AGX Orin 32GB at 15 to 40 W and AGX Orin 64GB at 15 to 60 W (NVIDIA Jetson pages, Connect Tech comparison).

ModuleTOPSPower WMemory GBTOPS/W
Nano0.51040.05
TX21.31540.087
Xavier NX212081.05
AGX Xavier3230161.07
AGX Orin 32GB20040325.0
AGX Orin 64GB27560644.6
NVIDIA Jetson (slide 21 values, TOPS per watt computed)

Here performance grew about 550x (0.5 to 275 TOPS) while power grew 6x, so efficiency still rose about 90x. The difference from the phone families is not the efficiency trend but the freedom to spend more watts when the application can afford them. A warehouse robot on a 60 W budget gets a different chip than a drone on 10 W.

Three families, one lesson

Snapdragon 845 to 8 Gen 1
17x performance, 1.1x power, fixed lid
Apple A11 to A17
58x performance, about 1x power, fixed lid
Jetson Nano to AGX Orin 64GB
550x performance, 6x power, ladder of tiers

The trap: TOPS from different vendors are not one axis

It is tempting to line up the A17 Pro at 35, the Snapdragon 888 at 26 and the Jetson AGX Orin at 275 and rank them. Do not. NVIDIA's Xavier and Orin figures are INT8 (Orin sparse INT8), while Nano and TX2 are FP16 FLOPS (NVIDIA Jetson pages). The cloud numbers on slide 18 are dense FP16. Qualcomm sums INT8 throughput across the CPU, GPU and Hexagon together. Apple does not state a precision at all. Sze, Chen, Yang and Emer titled a whole paper on this: "TOPS/W (Alone) Considered Harmful". Their point is that peak numbers say nothing about utilization on a real network; a fair comparison needs the same precision, the same workload and a measured, not theoretical, throughput (Sze et al., 2020).

Recall

The Snapdragon 845 and the 8 Gen 1 both run near 10 W. What changed between them, and by how much?

TOPS went from 3 to 52, about 17x, and efficiency from 0.33 to 5.2 TOPS/W, about 16x. A fanless phone cannot raise its power ceiling, so the gain had to be efficiency.

Recall

How does the Jetson family differ from phone chips in the power column, and why?

Power rises with performance, from 10 W (Nano) to 60 W (AGX Orin 64GB), because robots and industrial boxes have fans and a larger battery or wall power. NVIDIA sells a ladder of tiers rather than one thermal envelope.

Recall

Why can you not rank a 35 TOPS Apple A17 Pro against a 26 TOPS Snapdragon 888 from those numbers alone?

TOPS depend on precision (INT8 versus FP16), whether sparsity is counted, which units are summed and the real utilization on a workload. Apple gives no precision, Qualcomm sums CPU, GPU and DSP, and Jetson Orin counts sparse INT8. Sze et al. call TOPS/W alone harmful for exactly this reason.

Quick check

Across Snapdragon 845 to 8 Gen 1, performance rose about 17x while power stayed near 10 W. What forced that pattern?

Quick check

Which family on slides 19 to 21 shows power scaling up together with performance?

Quick check

Why are TOPS figures from different vendors not directly comparable?

The STM32F746NG is one chip with a Cortex-M7 core at 216 MHz, 1 MB of flash and 320 kB of SRAM, drawing about 360 mW. It is the "off-the-shelf commercial microcontroller" on which MCUNet ran ImageNet-class vision in part 01 (slide 7). Against the smallest Jetson, the Nano at 10 W and 4 GB, it has 28x less power and 12,500x less memory. This is the tier that TinyML is named for.

A microcontroller is a compact integrated circuit designed for embedded systems, integrating a processor, memory and input/output peripherals on a single chip. The MCUNet paper adds what the definition implies: these are "bare-metal devices that do not have an operating system, nor do they have DRAM" (Lin et al., 2020). Everything a model needs, weights and activations alike, must live in the on-chip flash and SRAM, because there is nothing else.

Processor, SRAM, flash and I/O share one die. Weights are read from flash into the core; activations are read and written between SRAM and the core.

The units drop two prefixes

Slide 22 quietly changes the axes. Power is in milliwatts, not watts. Memory is in kilobytes, not gigabytes. Performance is in DMIPS, not TOPS. Each change is a signal that this tier is a different world, and the last one deserves the most care.

BoardCoreClock MHzDMIPSPower mWSRAM kBFlashDMIPS/mW
Arduino ZeroCortex-M0+4845632256 kB7.5
Arduino DueCortex-M3841582696512 kB6.1
STM32F407VGCortex-M4168210132192 (slide says 196)1 MB1.6
STM32F746NGCortex-M72164623603201 MB1.3
Four microcontroller boards (slide 22 values plus verified core data, DMIPS per mW computed)

The core data come from the vendors: the Arduino Zero's SAMD21 is a Cortex-M0+ at 48 MHz with 32 kB SRAM and 256 kB flash; the Due's SAM3X8E is a Cortex-M3 at 84 MHz with 96 kB SRAM; the STM32F407VG is a Cortex-M4 at 168 MHz rated 210 DMIPS with 192 kB SRAM plus 4 kB backup and 1 MB flash; the STM32F746NG is a Cortex-M7 at 216 MHz rated 462 DMIPS with 320 kB SRAM and 1 MB flash (Arduino, Keil and ST documentation).

What DMIPS measures, and what it does not

Dhrystone is a synthetic benchmark that Reinhold Weicker published in 1984 to exercise typical systems code: integer arithmetic, string handling, pointer chasing, no floating point (Weicker, 1984). A DMIPS is Dhrystones per second divided by 1757, the score of a VAX 11/780, which was nominally a one-MIPS machine. Arm publishes DMIPS per MHz for each core so that a clock frequency turns into a rating: Cortex-M0+ 0.95, Cortex-M3 and M4 1.25, Cortex-M7 2.14 (Arm Cortex-M comparison table).

DMIPS=Dhrystones per second1757\text{DMIPS} = \frac{\text{Dhrystones per second}}{1757}
Normalized to the VAX 11/780
DMIPS=(DMIPS/MHz)×fclock\text{DMIPS} = (\text{DMIPS/MHz}) \times f_{\text{clock}}
How the slide's numbers arise

Worked example

Rebuilding the slide's DMIPS from Arm's table

  1. STM32F746, Cortex-M7

    2.14 × 216 = 462.2, matching the slide's 462.
  2. STM32F407, Cortex-M4

    1.25 × 168 = 210, matching the slide.
  3. Arduino Zero, Cortex-M0+

    0.95 × 48 = 45.6, matching the slide's 45.
  4. Arduino Due, Cortex-M3

    1.25 × 84 = 105, but the slide says 158, which implies about 1.88 DMIPS/MHz. That is an optimized-compiler score; Arm notes that Dhrystone results depend heavily on compiler switches.
  5. Result

    DMIPS is a core property times a clock. It says nothing about multiply-accumulate throughput.

So why can you not convert DMIPS into a small TOPS? Because the benchmark contains no MACs, and a neural network is almost nothing but MACs. You can only bound the MCU from above by counting what its SIMD unit could do at best.

Worked example

An upper bound on microcontroller TOPS

  1. Best-case MAC rate

    A Cortex-M7 can issue at most two 16-bit MACs per cycle with its SIMD instructions: 216 × 10^6 × 2 = 4.3 × 10^8 MACs per second.
  2. Convert to operations

    4.3 × 10^8 × 2 = 8.6 × 10^8 operations per second, about 0.0009 TOPS.
  3. Compare with the edge tier

    Jetson Nano at 0.5 TOPS is about 580x higher; Snapdragon 8 Gen 1 at 52 TOPS about 60,000x.
  4. Result

    Even after a generous conversion, the MCU sits three to five orders of magnitude below the accelerators. The design goal at this tier is fitting the workload in memory, not maximizing TOPS.

One more pattern in the table is worth noticing: DMIPS per milliwatt falls as the boards get faster, from 7.5 on the Zero to 1.3 on the F746. The faster core pays more energy per instruction. At this tier nobody buys the F746 for efficiency; they buy it because 320 kB is the smallest SRAM in which a useful vision model can breathe.

Recall

Define a microcontroller in one sentence and give the STM32F746's two memory numbers.

A compact integrated circuit for embedded systems that puts a processor, memory and I/O peripherals on a single chip. The STM32F746 has 320 kB of SRAM and 1 MB of flash.

Recall

What does DMIPS measure, and why can it not be compared with TOPS?

Dhrystone MIPS: a synthetic integer benchmark normalized to the VAX 11/780 (Dhrystones per second divided by 1757). It contains no floating point and no MACs, so it is not a neural network throughput figure.

Recall

Compute the DMIPS of a Cortex-M7 at 216 MHz using Arm's 2.14 DMIPS/MHz, and the ratio of a phone's 4 GB to the F746's 320 kB.

2.14 × 216 ≈ 462 DMIPS. 4 GB / 320 kB = 4,000,000 / 320 = 12,500x, about four orders of magnitude.

Quick check

What does the DMIPS figure on slide 22 measure?

Quick check

Which of the four boards is the Cortex-M7 device that MCUNet targeted in part 01?

Take ResNet-50, the workhorse image classifier from part 01, with 25,557,032 parameters (torchvision). At FP32 its weights are 102 MB; at FP16, 51 MB; at INT8, 25.6 MB. A cloud GPU holds the FP32 version 783 times over in its HBM. A phone stores it in 256 GB of flash with room for thousands of copies. A microcontroller's 1 MB flash cannot hold even the INT8 version, which is 25.6x too big. Slide 23 turns this into three tiers with two numbers each, and the ratios between them are the thesis of the course.

The lecture calls the tiers cloud AI, mobile AI and tiny AI, and gives each tier two budgets. Activation memory is the working memory that holds intermediate results during computation: 80 GB of HBM on an A100-class cloud GPU, 4 GB of DRAM on a phone, 320 kB of SRAM on the STM32F746. Weight storage is the persistent memory that holds the model: terabytes to petabytes in a data center, 256 GB of phone flash, 1 MB of on-chip flash.

TierExample deviceActivation memoryWeight storageMemory vs tinyStorage vs tiny
Cloud AIA100-class GPU80 GBabout 1 TB or more250,000xabout 1,000,000x
Mobile AIflagship phone4 GB256 GB12,500x256,000x
Tiny AISTM32F746320 kB1 MB1x1x
Three tiers on slide 23, with ratios to the tiny tier
Three activation-memory squares whose side lengths follow log size; ResNet-50's 7.2 MB peak activation fits inside the mobile square but spills 22.5x past the tiny SRAM. The flash check for its weights is in the fit table below.
80 GB320 kB=80×106 kB320 kB=250,000\frac{80\ \text{GB}}{320\ \text{kB}} = \frac{80 \times 10^{6}\ \text{kB}}{320\ \text{kB}} = 250{,}000
Cloud to tiny activation memory, with 1 GB = 1,000,000 kB

Adjacent ratios worth memorizing

Cloud to mobile, activation
80 GB / 4 GB = 20x
Mobile to tiny, activation
4 GB / 320 kB = 12,500x
Cloud to tiny, activation
20 × 12,500 = 250,000x
Cloud to mobile, storage
about 1 TB / 256 GB ≈ 4x (taking the low end of TB/PB)
Mobile to tiny, storage
256 GB / 1 MB = 256,000x

MCUNet states the same gap in words: microcontroller memory is "3 orders of magnitude smaller than mobile devices, and 5-6 orders of magnitude smaller than cloud GPUs" (Lin et al., 2020). Its 2020 table used a V100 with 16 GB and an iPhone 11 with more than 64 GB; the slide updates the cloud and mobile columns to an 80 GB A100 and a 256 GB phone, while the tiny column is unchanged at 320 kB and 1 MB. The top tiers moved; the bottom did not.

Two budgets, not one

The two rows on slide 23 are not interchangeable, and confusing them is the most common mistake in sizing a TinyML deployment. Storage holds the weights persistently, so what matters is the total model size, and on an MCU that budget is the read-only flash. Activation memory is the read-write scratch space used while a layer runs, so what matters is the peak across layers, because a layer's input and output tensors must coexist at the moment it executes. MCUNet puts it in one line: "SRAM constrains the activation size (read and write); Flash constrains the model size (read-only)". A model can fit in flash and still crash at runtime because one wide early layer's activations exceed SRAM, and a model with small activations can still be unloadable because its weights exceed flash.

QuantitySizeCloud, 80 GB HBMMobile, 256 GB flash and 4 GB DRAMTiny, 1 MB flash and 320 kB SRAM
FP32 weights102.2 MByes, 783x headroomyesno, 102x over
FP16 weights51.1 MByesyesno, 51x over
INT8 weights25.6 MByesyesno, 25.6x over
Peak activation (MCUNet)7.2 MByesyesno, 22.5x over 320 kB SRAM
Does ResNet-50 fit? (25,557,032 parameters; peak activation from MCUNet Table 1)

Worked example

Two budgets, one model: MobileNetV2 at INT8 on the STM32F746

  1. Storage check

    MobileNetV2 INT8 weights are 3.4 MB (MCUNet Table 1). Against 1 MB of flash that is 3.4x over.
  2. Activation check

    Its peak activation is 1.7 MB. Against 320 kB of SRAM that is 5.3x over.
  3. What MCUNet did

    Co-designed the network (TinyNAS, a memory-aware architecture search) with the runtime (TinyEngine), cutting SRAM use by 3.5x and flash by 5.7x versus quantized MobileNetV2 (Lin et al., 2020).
  4. Result

    Both budgets had to be satisfied separately. Quantization alone (4x from FP32 to INT8) closes neither gap; the architecture and the runtime had to change too.

Why the rest of the course exists

Put the two halves of this lecture side by side. The largest model in part 02, MT-NLG at 530B parameters, needs 1.06 TB of FP16 weights. The smallest tier here offers 1 MB. That is a factor of about one million, six orders of magnitude. GPU memory grew 12x in eight years, and phone memory grew 4x across the Snapdragon generations on slide 19. No hardware trend closes six orders of magnitude on any timescale that matters. So the model must change.

Worked example

530B at FP16 against each tier

  1. Cloud

    1.06 TB / 80 GB = 13.25: fourteen A100s just for the weights, as computed in the first concept.
  2. Mobile

    1.06 TB / 256 GB = 4.1: does not fit even the phone's storage, let alone its 4 GB of working memory.
  3. Tiny

    1.06 TB / 1 MB = 1,060,000: a million times over.
  4. Result

    Every tier below the cloud rejects the model. Compression is not optional; it is the subject.

Each later lecture is one lever on the model side of this gap. Pruning removes weights; quantization shrinks each remaining weight from 4 bytes to 1 or fewer; neural architecture search, including Once-for-All from part 01, designs networks under an explicit memory budget; knowledge distillation transfers a large model's accuracy into a small one; and algorithm and system co-design, as in TinyEngine, makes the runtime spend the budget wisely. Slide 24 credits the source of this framing: the deck follows Prof. Song Han's MIT 6.5940 course, TinyML and Efficient Deep Learning Computing, whose introductory lecture carries the same charts (MIT HAN Lab).

Recall

Give the six numbers on slide 23.

Activation memory: 80 GB, 4 GB, 320 kB. Weight storage: about TB to PB, 256 GB, 1 MB.

Recall

Distinguish activation memory from weight storage and name the microcontroller component for each.

Activation memory is the read-write working memory during inference; its peak across layers matters; on an MCU it is SRAM. Weight storage holds the read-only weights; the total model size matters; on an MCU it is flash.

Recall

Does INT8 ResNet-50 fit the tiny AI tier? Check both budgets.

No. Its 25.6 MB of weights is 25.6x the 1 MB flash, and its 7.2 MB peak activation (MCUNet) is about 22x the 320 kB SRAM. It fails both.

Quick check

Using 1 GB = 1,000,000 kB, what is the ratio of cloud AI activation memory (80 GB) to tiny AI (320 kB)?

Quick check

A model's INT8 weights fit in an MCU's 1 MB flash, yet inference crashes. What is the most likely reason?

Quick check

On slide 23, which budget does the 256 GB figure for mobile AI describe?

Quick check

Why does the course turn to compression, quantization and NAS rather than waiting for hardware?

Recap

If you remember nothing else

  • Slide 17 repeats the three pillars. Part 01 covered algorithm and data; this part is the hardware pillar.
  • P100 to B100: dense FP16 18.7 to 1750 TOPS (94x), power 250 to 700 W (2.8x), memory 16 to 192 GB (12x), bandwidth 732 to 8192 GB/s (11x). TOPS/W: 0.075, 0.42, 0.78, 1.41, 2.5.
  • TOPS counts two operations per MAC. NVIDIA headline numbers double with 2:4 sparsity; the slide and this part use dense figures.
  • The memory wall: peak compute grows about 3x every two years while DRAM bandwidth grows about 1.6x, so bandwidth and capacity, not TOPS, bound LLM serving.
  • Phones are capped near 10 W by heat. Snapdragon 845 to 8 Gen 1 went 3 to 52 TOPS (17x) at flat power; Apple A11 to A17 went 0.6 to 35 TOPS at 6 to 8 W.
  • Jetson is a system on module whose power scales with tier: 0.5 TOPS at 10 W (Nano) to 275 TOPS at 60 W (AGX Orin 64GB).
  • TOPS figures depend on precision, sparsity and workload. Compare only within a family at the same precision.
  • A microcontroller puts processor, memory and I/O on one chip. STM32F746: Cortex-M7, 216 MHz, 462 DMIPS, 320 kB SRAM, 1 MB flash, about 360 mW.
  • DMIPS is an integer benchmark (Dhrystones per second divided by 1757), not a neural network throughput. MCU compute is on the order of 0.001 TOPS.
  • Cloud, mobile, tiny: 80 GB, 4 GB, 320 kB of activation memory (20x and 12,500x steps, 250,000x end to end); about 1 TB, 256 GB, 1 MB of weight storage (256,000x mobile to tiny).
  • Activation memory (SRAM, peak per layer) and weight storage (flash, total size) are separate budgets. ResNet-50 fails both on an MCU, by about 100x and 22x.
  • A 530B FP16 model (1.06 TB) is a million times a 1 MB flash. The course closes the gap on the model side: pruning, quantization, NAS, distillation and co-design.
  • The deck follows Prof. Song Han's MIT 6.5940 TinyML and Efficient Deep Learning Computing.

Sources