Inferensys

Glossary

MCUNet

A co-designed framework pairing a compact neural architecture search space with a specialized inference library to enable ImageNet-scale computer vision on commercial microcontrollers with limited off-chip memory.
Engineer reviewing vector database search results on laptop, embeddings visualization on screen, home office coding session.
TINY DEEP LEARNING FRAMEWORK

What is MCUNet?

MCUNet is a system-algorithm co-design framework that enables deep neural network inference on commercial microcontrollers with severely constrained memory.

MCUNet is a co-designed framework that pairs a compact Neural Architecture Search (NAS) space with the TinyEngine inference library to run ImageNet-scale computer vision on microcontrollers with less than 256KB of SRAM. It overcomes the memory bottleneck by jointly optimizing the model topology and the scheduling of intermediate activations, enabling TinyML deployment without external DRAM.

The framework introduces patch-based inference, which processes large feature maps in overlapping segments to keep peak SRAM footprint below the hardware limit. By fusing the search for efficient architectures with a memory-aware compilation strategy, MCUNet achieves state-of-the-art accuracy on Arm Cortex-M processors, making on-device visual wake words and person detection viable on coin-cell-powered hardware.

TINY DEEP LEARNING ARCHITECTURE

Key Features of the MCUNet Framework

MCUNet is a system-algorithm co-design framework that enables ImageNet-scale deep learning inference on commercial microcontrollers with less than 256KB of SRAM and 1MB of flash memory.

01

TinyNAS: Two-Stage Neural Architecture Search

TinyNAS employs a two-stage search that first optimizes the search space itself based on the target hardware's resource constraints, then searches for the optimal architecture within that constrained space. This hardware-aware pruning of the search space ensures that candidate architectures are inherently feasible for microcontrollers before any training begins, dramatically reducing the search cost and preventing the selection of models that would exceed SRAM limits during inference.

<256KB
SRAM Budget
70.7%
ImageNet Top-1 Accuracy
02

TinyEngine: Memory-Efficient Inference Library

TinyEngine is a specialized inference runtime that replaces generic deep learning libraries with code-generation-based optimizations tailored to the specific model architecture. It eliminates runtime overhead by:

  • In-place depthwise convolution to reduce peak memory
  • Operator fusion to minimize intermediate tensor allocations
  • Loop unrolling and tiling optimized for Cortex-M cache hierarchies This co-designed library removes the reliance on heavy frameworks like CMSIS-NN for every operation, achieving a 4.1x speedup over TensorFlow Lite Micro on the same hardware.
4.1x
Speedup vs TFLite Micro
03

Patch-Based Inference for High-Resolution Inputs

To handle large input resolutions without exceeding SRAM, MCUNet introduces patch-based inference. The input image is divided into overlapping patches that are processed sequentially, with feature maps stitched together at a later stage. This technique decouples the peak activation memory from the input resolution, enabling models to process 224x224 images on devices with only 256KB of SRAM—a feat previously considered impossible for microcontrollers.

04

Redistributed Activation Scheduling

Traditional layer-by-layer execution stores the full activation map of one layer before computing the next, creating a high peak memory watermark. MCUNet's TinyEngine redistributes this computation by fusing early layers with depthwise convolutions and scheduling partial computations. This reduces the peak SRAM footprint by up to 4.5x compared to standard inference engines, allowing deeper networks to fit within the same memory budget.

4.5x
Peak Memory Reduction
05

Compiler-Based Code Generation vs. Interpreter Overhead

Unlike interpreter-based runtimes that fetch and execute generic kernel implementations at runtime, TinyEngine uses a compiler-based approach that generates specialized C code for the exact model graph. This eliminates:

  • Kernel dispatch overhead
  • Unnecessary memory copies between operators
  • Runtime shape inference for static graphs The result is deterministic, minimal-latency execution suitable for hard real-time signal processing on bare-metal systems.
06

Joint Optimization of Model and Memory Scheduling

MCUNet's core innovation is the co-search of the neural architecture and the memory scheduling strategy. During the search phase, candidate architectures are evaluated not just on accuracy and FLOPs, but on their actual peak SRAM usage under TinyEngine's optimized scheduling. This joint optimization discovers non-intuitive architectural patterns—such as specific kernel sizes and channel counts—that maximize accuracy while aligning perfectly with the compiler's ability to fuse and tile operations.

MCUNET CLARIFIED

Frequently Asked Questions

Direct answers to the most common technical questions about the MCUNet framework for deploying deep learning on microcontrollers.

MCUNet is a co-designed system-algorithm framework that enables ImageNet-scale deep learning inference on commercial microcontrollers with less than 256KB of SRAM and 1MB of flash memory. It works by tightly coupling two components: TinyNAS, a two-stage neural architecture search engine that generates compact models optimized for minimal memory usage, and TinyEngine, a memory-efficient inference library that eliminates redundant runtime buffers. Unlike standard deep learning frameworks that assume abundant memory, MCUNet jointly optimizes the neural network topology and the execution scheduler, effectively treating the compiler and the architecture as a single search space. This co-design approach allows models like MobileNetV2 to run on devices such as the STM32F746, which lacks external DRAM, by carefully managing the peak SRAM footprint during operator execution.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.