kirancodes.me
To Proof Maintenance & Beyond!

TinyGen: Portable and Compact Code Generation for Tiny Machine Learning

Gaeun Ko, Seonyeong Heo

Abstract

Tiny machine learning (TinyML) enables low-power microcontrollers to leverage the power of artificial intelligence without relying on remote computing resources. Typically, developing a TinyML application relies primarily on existing TinyML frameworks, which provide runtime APIs for loading and executing machine learning models. However, such framework-based TinyML development has limitations in terms of portability, programmability, and resource efficiency, motivating the need for a new approach to the TinyML development and deployment process.

To address these challenges, this work introduces TinyGen, a new code generation framework for TinyML. TinyGen generates portable high-level code directly from a target model without depending on external runtime APIs. It statically analyzes the tensor and operator usage of the target model to enable compact code generation. This work demonstrates that TinyGen reduces binary code size by 31.2% on average compared to an existing TinyML framework while requiring fewer lines of code to write TinyML applications.

Related papers