arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.19167cs.LGcs.AIcs.DC
收藏

面向微控制器上深度神经网络设备端学习的降低精度浮点优化

Reduced Precision Floating-Point Optimization for Deep Neural Network On-Device Learning on MicroControllers

University of Bologna(博洛尼亚大学);Politecnico di Torino(都灵理工大学);Katholieke Universiteit Leuven(鲁汶天主教大学);ETH Zurich(苏黎世联邦理工学院)

Davide Nadalini, Manuele Rusci, Luca Benini, Francesco Conti

AI总结:

本文提出面向MCU设备端学习的降低精度FP16 SIMD优化方法,通过形状变换与矩阵乘法内核加速反向传播,在RISC-V多核MCU上比FP32基线快1.72倍,并显著超越现有ODL框架。

摘要:

为超低功耗微控制器单元(MCU)实现设备端学习(ODL)是未来 TinyML 应用中深度神经网络(DNN)模型部署后自适应与微调的关键一步。本文通过引入一种面向 MCU 级设备 ODL 原语的新型降低精度优化技术来应对这一挑战,该技术利用了 RISC-V RV32 架构的最新进展,支持向量化 16 位浮点(FP16)单指令多数据(SIMD)操作。我们针对反向传播训练算法的前向和后向步骤所提出的方法由专门的形状变换算子和矩阵乘法(MM)内核组成,并通过并行化和循环展开进行加速。在 2D 卷积层的单次训练步骤上评估时,基于 RISC-V 的 8+1 核 MCU 上,SIMD 优化的 FP16 原语比 FP32 基线快达 1.72 倍。在 ResNet8 和 DS-CNN 分别用于图像分类和关键词识别的端到端训练任务中,测得平均计算效率为每时钟周期 3.11 次乘累加操作(MAC/clk)和 0.81 MAC/clk——在目标平台上对单个样本计算一次训练步骤分别需要 17.1 ms 和 6.4 ms。总体而言,我们的方法比现有的单核 MCU ODL 软件框架快两个数量级以上,并且在持续学习设置中比之前的 FP32 并行实现性能高出 1.6 倍。

英文摘要:

Enabling On-Device Learning (ODL) for Ultra-Low-Power Micro-Controller Units (MCUs) is a key step for post-deployment adaptation and fine-tuning of Deep Neural Network (DNN) models in future TinyML applications. This paper tackles this challenge by introducing a novel reduced precision optimization technique for ODL primitives on MCU-class devices, leveraging the State-of-Art advancements in RISC-V RV32 architectures with support for vectorized 16-bit floating-point (FP16) Single-Instruction Multiple-Data (SIMD) operations. Our approach for the Forward and Backward steps of the Back-Propagation training algorithm is composed of specialized shape transform operators and Matrix Multiplication (MM) kernels, accelerated with parallelization and loop unrolling. When evaluated on a single training step of a 2D Convolution layer, the SIMD-optimized FP16 primitives result up to 1.72$\times$ faster than the FP32 baseline on a RISC-V-based 8+1-core MCU. An average computing efficiency of 3.11 Multiply and Accumulate operations per clock cycle (MAC/clk) and 0.81 MAC/clk is measured for the end-to-end training tasks of a ResNet8 and a DS-CNN for Image Classification and Keyword Spotting, respectively -- requiring 17.1 ms and 6.4 ms on the target platform to compute a training step on a single sample. Overall, our approach results more than two orders of magnitude faster than existing ODL software frameworks for single-core MCUs and outperforms by 1.6 $\times$ previous FP32 parallel implementations on a Continual Learning setup.

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

↑