NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

TinyOps: ImageNet Scale Deep Learning on Microcontrollers

Sulaiman Sadiq, Jonathon S. Hare, Partha Maji, Simon Craske, Geoff V. Merrett

Introduction

In the rapidly evolving field of TinyML, microcontrollers (MCUs) are often constrained by a fundamental "memory wall." Developers typically face a binary choice: utilize fast but extremely limited internal SRAM (often less than 1MB), or leverage larger but significantly slower external memory like SDRAM or Flash. This trade-off forces a compromise between model accuracy and inference latency. Internal-memory-only models are fast but small, while external-memory models can be large and accurate but suffer from prohibitive latency that renders real-time applications impossible.

TinyOps introduces a novel inference engine that bridges this gap. By intelligently orchestrating data movement between internal and external memory, TinyOps enables ImageNet-scale deep learning on standard MCUs with performance that rivals internal-memory-only solutions.

TinyOps occupies a superior design space, offering high accuracy with low latency by accelerating external memory access.

The TinyOps Architecture

The core innovation of TinyOps is its ability to "expand and accelerate." It acts as a specialized layer between high-level model interpreters (such as TensorFlow Lite Micro) and the underlying hardware. The engine employs three primary techniques to overcome memory bottlenecks:

1. Operator Partitioning (Tiny Tensors)

To handle models that exceed SRAM capacity, TinyOps partitions large operations into manageable "tiny tensors." By breaking down tensors—typically along the height ($H$) dimension—the engine creates blocks that fit comfortably within the MCU's internal memory.

2. DMA Pipelining and Ping-Pong Buffering

The most critical component of TinyOps is its use of the Direct Memory Access (DMA) peripheral. This hardware feature allows for background data movement without taxing the CPU. TinyOps implements a "ping-pong" buffering scheme: while the CPU processes one tiny tensor currently residing in SRAM, the DMA simultaneously fetches the subsequent block from external SDRAM. This parallelization effectively hides the high latency associated with external memory access.

The TinyOps execution flow uses DMA streams to pipeline data movement alongside CPU computation, hiding external memory latency.

3. Data Overlaying

Beyond input data, TinyOps also manages the movement of weights (filters) and biases. By overlaying these parameters into SRAM buffers using pre-emptive scheduling across multiple DMA streams, the engine ensures that the CPU rarely stalls waiting for data, maintaining high throughput even for complex architectures.

Experimental Evaluation

The researchers evaluated TinyOps on the ImageNet dataset, a benchmark traditionally considered beyond the reach of microcontrollers. The study utilized several state-of-the-art architectures, including ProxylessNAS, MobileNetV3, MNASNet, and MCUNet (the latter serving as a baseline for internal-memory-optimized models).

Testing was conducted on two widely used hardware platforms:

  • STM32F469: 256KB SRAM, 1024KB Flash.
  • STM32F746: 320KB SRAM, 1024KB Flash.

Key Insights and Results

The results demonstrate that the hybrid memory management of TinyOps creates a fundamentally more efficient design space.

  • Inference Speedup: TinyOps achieved a 1.3x to 2.2x reduction in latency compared to standard external memory implementations (EM-TFLM).
  • Accuracy Improvements: By enabling the use of larger, more complex models, TinyOps outperformed models restricted to internal memory by up to 6% in Top-1 accuracy on ImageNet. Notably, an MNASNet model on the STM32F746 reached 68.2% Top-1 accuracy, a significant milestone for this hardware class.
  • Energy Efficiency: While external memory and DMA usage increase instantaneous power consumption, the dramatic reduction in total inference time leads to a net decrease in energy per inference—up to 2.2x better than traditional external memory setups.
  • Memory Orchestration vs. FLOPs: A key takeaway is that for MCUs, memory orchestration is often more impactful than raw operation counts (FLOPs). A model with more Multiply-Accumulates (MACs) can outperform a "lighter" model if its data movement is pipelined more effectively.

Conclusion and Future Directions

TinyOps represents a significant shift in how we approach deep learning on the edge. By breaking the memory wall, it allows for high-fidelity models to run on low-cost, low-power hardware. Future work may involve integrating TinyOps with hand-optimized assembly kernels for further speedups and developing Neural Architecture Search (NAS) techniques specifically tuned for the TinyOps partitioning scheme. Expanding partitioning strategies beyond the height dimension could also improve support for a wider variety of neural network layers and data layouts.

Summary updated

BibTeX
@inproceedings{sadiq2022tinyops,
  author = {Sulaiman Sadiq and Jonathon S. Hare and Partha Maji and Simon Craske and Geoff V. Merrett},
  title = {{TinyOps: ImageNet Scale Deep Learning on Microcontrollers}},
  booktitle = {Workshops @ CVPR},
  year = {2022},
  doi = {10.1109/cvprw56347.2022.00304},
}
Figure