arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.04134cs.LG
收藏

InstMeter: 一种指令级方法,用于预测DL模型在MCU上的能耗和延迟

InstMeter: An Instruction-Level Method to Predict Energy and Latency of DL Model Inference on MCUs

Delft University of Technology(代尔夫特理工大学)

Hao Liu, Qing Wang, Marco Zuniga

AI总结:

InstMeter通过利用MCU时钟周期预测DL模型的能耗和延迟,相比现有方法更准确且数据需求更低。

摘要:

深度学习(DL)模型现在可以运行在微控制器(MCU)上。通过神经架构搜索(NAS),我们可以搜索符合MCU约束条件的DL模型。在各种约束中,模型推断的能耗和延迟成本是关键指标。为了预测这些,现有研究依赖于粗略的代理,如乘法-累加(MACs)和模型的输入参数,往往导致预测不准确或需要大量数据收集。在本文中,我们提出InstMeter,一种利用MCU时钟周期来准确估计DL模型能耗和延迟的预测器。时钟周期是反映MCU操作的基本指标,直接决定能耗和延迟成本。此外,我们预测器的一个独特性质是其强线性性,使其简单且准确。我们彻底评估InstMeter在不同场景、MCU和软件设置下的性能。与最先进研究相比,InstMeter可以将能耗和延迟预测误差分别减少3倍和6.5倍,同时只需要100倍和10倍的训练数据。在NAS场景中,InstMeter可以充分利用能量预算,识别具有更高推断准确度的最优DL模型。我们还通过在三种ARM MCU(Cortex-M4、M7、M33)和一种RISC-V基于的MCU(ESP32-C3)上进行的各种实验,评估InstMeter的泛化性能。不同的编译选项(-Os、-O2)、GCC版本(v7.3、v10.3)、应用场景(关键词识别、图像识别)、动态电压和频率调节、温度(21°C、43°C)和软件设置(TFLMv2.4、TFLMvCI)也进行了评估。我们将会开源我们的源代码和MCU特定的基准数据集。

英文摘要:

Deep learning (DL) models can now run on microcontrollers (MCUs). Through neural architecture search (NAS), we can search DL models that meet the constraints of MCUs. Among various constraints, energy and latency costs of the model inference are critical metrics. To predict them, existing research relies on coarse proxies such as multiply-accumulations (MACs) and model's input parameters, often resulting in inaccurate predictions or requiring extensive data collection. In this paper, we propose InstMeter, a predictor leveraging MCUs' clock cycles to accurately estimate the energy and latency of DL models. Clock cycles are fundamental metrics reflecting MCU operations, directly determining energy and latency costs. Furthermore, a unique property of our predictor is its strong linearity, allowing it to be simple and accurate. We thoroughly evaluate InstMeter under different scenarios, MCUs, and software settings. Compared with state-of-the-art studies, InstMeter can reduce the energy and latency prediction errors by $3\times$ and $6.5\times$, respectively, while requiring $100\times$ and $10\times$ less training data. In the NAS scenario, InstMeter can fully exploit the energy budget, identifying optimal DL models with higher inference accuracy. We also evaluate InstMeter's generalization performance through various experiments on three ARM MCUs (Cortex-M4, M7, M33) and one RISC-V-based MCU (ESP32-C3), different compilation options (-Os, -O2), GCC versions (v7.3, v10.3), application scenarios (keyword spotting, image recognition), dynamic voltage and frequency scaling, temperatures (21°C, 43°C), and software settings (TFLMv2.4, TFLMvCI). We will open our source codes and the MCU-specific benchmark datasets.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑