用Rust打造多核MCU上神经网络并行推理工具,兼顾速度与内存效率。
Ariel-ML: Computing Parallelization with Embedded Rust for Neural Networks on Heterogeneous Multi-core Microcontrollers
- 基于Rust构建通用TinyML流水线,自动实现多核并行推理。
- 在多种32位MCU上测试,推理延迟优于现有方案,内存占用相当。
- 适合边缘AI开发者和资源受限的嵌入式Rust工程师使用。
低功耗微控制器(MCU)正从单核架构转向多核架构,同时嵌入式开发逐渐采用Rust语言,取代传统C/C++。小型人工神经网络(ANN)在边缘AI场景中日益普及,需直接部署于低功耗MCU上执行。然而,此前缺乏能自动在多核MCU上并行化任意TinyML模型推理的Rust嵌入式平台。本文提出Ariel-ML,一个结合通用TinyML流程与嵌入式Rust平台的新工具包,可充分利用各类32位MCU(如Arm Cortex-M、RISC-V、ESP32)的多核能力。我们开源了完整实现,并在多种TinyML模型上进行了基准测试。结果表明,Ariel-ML在推理延迟方面优于现有方案,且内存占用与基于C/C++的现有工具包相当。该工具为TinyML实践者及资源受限的嵌入式Rust开发者提供了有力支持。
原文摘要 · Abstract (English)
Low-power microcontroller (MCU) hardware is currently evolving from single-core architectures to predominantly multi-core architectures. In parallel, new embedded software building blocks are more and more written in Rust, while C/C++ dominance fades in this domain. On the other hand, small artificial neural networks (ANN) of various kinds are increasingly deployed in edge AI use cases, thus deployed and executed directly on low-power MCUs. In this context, both incremental improvements and novel innovative services will have to be continuously retrofitted using ANNs execution in software embedded on sensing/actuating systems already deployed in the field. However, there was so far no Rust embedded software platform automating parallelization for inference computation on multi-core MCUs executing arbitrary TinyML models. This paper thus fills this gap by introducing Ariel-ML, a novel toolkit we designed combining a generic TinyML pipeline and an embedded Rust software platform which can take full advantage of multi-core capabilities of various 32bit microcontroller families (Arm Cortex-M, RISC-V, ESP-32). We published the full open source code of its implementation, which we used to benchmark its capabilities using a zoo of various TinyML models. We show that Ariel-ML outperforms prior art in terms of inference latency as expected, and we show that, compared to pre-existing toolkits using embedded C/C++, Ariel-ML achieves comparable memory footprints. Ariel-ML thus provides a useful basis for TinyML practitioners and resource-constrained embedded Rust developers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。