te-comp: A Complete MLIR Compiler Generating Self-Contained C Inference Engines for MCUs

te-comp:一个完整的 MLIR 编译器,为 MCU 生成独立的 C 推理引擎

Van Chan Ngo · arXiv:2611.03710 · 2026-10-31 · cs.PL

论文自动收录 · 未精读PDF ↗arXiv 原文 ↗
壹摘要

在微控制器 (MCU) 上部署深度学习需要将模型权重和运行时激活拟合到数十到数百 KB 的 SRAM 和闪存内。现有方法要么使用带有预先编写的内核库的解释器,要么将 Python 代码生成器与手写的 C 内核相结合。这会产生调度开销并且需要框架依赖性。没有一个会生成专用于给定模型的自包含、无依赖性的 C 代码。在本文中,我们介绍了 te-comp,这是第一个完整的基于 MLIR 的编译器,它采用 .tflite 或 .safetensors 格式的标准模型,并生成部署所需的所有 C 源文件

中文为机器翻译节选,以英文原文为准。

English abstract

Deploying deep learning on microcontrollers (MCUs) requires fitting both the model weights and runtime activations within tens to hundreds of kilobytes of SRAM and Flash. Existing approaches either use an interpreter with a pre-written kernel library or combine a Python code generator with hand-written C kernels. This incurs dispatch overhead and requires framework dependencies. None produces self-contained, dependency-free C code specialized to a given model. In this paper, we present te-comp, the first complete MLIR-based compiler that takes a standard model in .tflite or .safetensors format and emits all C source files needed for deployment: the inference engine (kernels, weight arrays, memory layout) and the RTOS integration layer with zero runtime dependencies. On 10 MCUNet CNN benchmarks, te-comp outperforms MCUNet TinyEngine by using 38% less SRAM (up to 5.9times) and 15% less…

贰引用
Van Chan Ngo. te-comp: A Complete MLIR Compiler Generating Self-Contained C Inference Engines for MCUs. arXiv:2611.03710 (2026-10-31). https://arxiv.org/abs/2611.03710v1