Power-Performance Characterization of TinyML Systems
Organizations: School of Computing, National University of Singapore
Abstract
TinyML systems are enabling machine learning (ML) inference at the edge. However, there is little quantitative analysis of such systems. This paper presents a systematic performance and power characterization of diverse TinyML applications on microcontrollers (MCUs), spanning neural network models, software libraries, operating systems, and hardware architectures. We focus on the impact of the multiple layers of abstraction that provide higher programmability at the expense of performance and energy efficiency. We propose a model to estimate the costs of different abstraction layers and make recommendations for minimizing those costs. Our findings can help designers with Neural Architecture Search (NAS) and CNN inference optimization on edge devices.
Figures & tables
| Platforms | Highlight | |
| [ 5 ] | MCU | State-of-the-art MicroNets based on differentiable NAS for three TinyML tasks. |
| [ 6 ] | MCU | A toolchain of TFLite model implementation on MCUs using Mbed OS for NAS. |
| [ 7 ] | Edge TPU | 1. Microarchitectural insights of Edge TPUs. 2. Prediction model for faster evaluation of accelerators. |
| [ 13 ] | Four SoC, one MCU | Performance comparison of four SoCs and one MCU for different models and frameworks. |
| Ours | MCU | Recommendation to overcome the performance costs from a full-stack view. |
| Arduino Nano 33 BLE Sense | Nucleo-64 STM32L476RG | SparkFun Edge | Nucleo-144 STM32F746ZG | |
| Acronym | MCU-S | MCU-M | MCU-B | MCU-D |
| Processor | Cortex-M4F | Cortex-M4F | Cortex-M4F | Cortex-M7F |
| Frequency | 64 MHz | 80 MHz | 96 MHz | 216 MHz |
| Bandwidth | 67.3 MB/s | 86.9 MB/s | 88.6 MB/s | 251.6 MB/s |
| SRAM | 256 KB | 128 KB | 384 KB | 320 KB |
| Flash | 1 MB | 1 MB | 1 MB | 1 MB |
| Micro Speech | Person Detection | Keyword Spotting | Image Classification | Anomaly Detection | |
| Description | Recognizing two wake words | Recognizing Person | 10 keyword spotting —— ”No”, ”Up”,… | Small image classification | Detecting anomalies in machine operating sounds |
| Model | —— | MobileNet [ 20 ] | DS-CNN [ 21 ] | ResNet [ 22 ] | Deep AutoEncoder |
| Layers | Conv+FC | Conv+13 DSC+FC | Conv+4 DSC+FC | 9 Conv+FC | 10 FC |
| Dataset | Speech Commands | COCO | Speech Commands | Cifar10 | ToyADMOS |
| #MACC | 336k | 7158k | 2657k | 12502k | 264k |
| OPs | 676k | 15029k | 5541k | 25271k | 538k |
| Latency (ms) | SRAM (KB) | Binary (KB) | Energy (mJ) | |
| 1) Unoptimized code+Bare-Metal | 488.3 | 6.6 | 37 | 54.2 |
| 2) CMSIS-NN+Bare-Metal | 46.2 | 4.1 | 28 | 5.1 |
| 3) CMSIS-NN+Mbed OS | 47.5 | 8.1 | 83 | 8.4 |
| 4) CMSIS-NN+Simpl. Mbed OS | 47.5 | 7.7 | 53 | 5.6 |
| 5) TFLM+CMSIS-NN+Mbed OS | 48.9 | 11.8 | 99 | 9.5 |
| #MACC | #MEM | MCU-S | MCU-B | MCU-D | |
| Layer A | 295k | 627k | 66 ms | 31 ms | 11 ms |
| Layer B | 590k | 1198k | 40 ms | 21 ms | 6 ms |
| Ratio(B/A) | 2x | 1.91x | 0.61x | 0.69x | 0.53x |
| Layer C | 295k | 608k | 28 ms | 15 ms | 5 ms |
| Layer D | 590k | 1184k | 31 ms | 16 ms | 4 ms |
| Ratio(D/C) | 2x | 1.95x | 1.09x | 1.04x | 0.92x |
| MCU-M | MCU-B | MCU-D | |
| Anomaly Detection | 1.43 | 1.64 | 6.89 |
| Micro Speech | 1.27 | 1.53 | 6.67 |
| Keyword Spotting | 1.38 | 1.84 | 6.82 |
| Person Detection | ✗ | 1.77 | 6.63 |
| Image Classification | 1.36 | 2.14 | 5.99 |
| Average Throughput | 1.36 | 1.78 | 6.60 |
| MicroNet-KWS-L | MicroNet-KWS-M | MicroNet-KWS-S | |
| Model | 659 KB | 182 KB | 115 KB |
| Arena | 205 KB | 105 KB | 70 KB |
| Layers | Conv+7 DSC+FC | Conv+5 DSC+FC | Conv+5 DSC+FC |
| #MACC | 65714k | 15556k | 8327k |
| Applications | MCU-S | MCU-D | |
| MicroNet-KWS-L | Working Memory | 254 KB | 215 KB |
| Binary | 793 KB | 738 KB | |
| Latency | 3790 ms | 566 ms | |
| MicroNet-KWS-M | Working Memory | 152 KB | 112 KB |
| Binary | 316 KB | 261 KB | |
| Latency | 1118 ms | 172 ms | |
Tiny ML
Tiny machine learning (TinyML) brings machine-learning inference and learning to low-power devices with limited memory and compute.
See all 49 papers