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.
翻译:低功耗微控制器(MCU)硬件正从单核架构向以多核架构为主的趋势演进。与此同时,C/C++在该领域的主导地位逐渐减弱,新的嵌入式软件构建模块越来越多地采用Rust语言编写。另一方面,各类小型人工神经网络(ANN)正越来越多地部署于边缘AI应用场景,即直接在低功耗MCU上执行推理。在此背景下,针对已部署的传感/执行系统中的嵌入式软件,需要持续通过ANN执行来实现增量改进与新型创新服务。然而,目前尚无能够对多核MCU上执行任意TinyML模型的推理计算实现自动并行化的Rust嵌入式软件平台。本文通过提出Ariel-ML填补了这一空白——我们设计的新型工具包结合了通用TinyML流程与嵌入式Rust软件平台,可充分利用多种32位微控制器系列(Arm Cortex-M、RISC-V、ESP-32)的多核能力。我们已公开发布其实现的完整开源代码,并利用多种TinyML模型基准测试验证其性能。结果表明,Ariel-ML在推理延迟方面如预期优于现有技术,且与基于嵌入式C/C++的既有工具包相比,实现了可比的存储占用。因此,Ariel-ML为TinyML实践者及资源受限的嵌入式Rust开发者提供了实用基础。