arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.14274cs.ARcs.AI
收藏

RISC-V内核上的混合精度神经网络:面向多泵浦软SIMD操作的ISA扩展

Mixed-precision Neural Networks on RISC-V Cores: ISA extensions for Multi-Pumped Soft SIMD Operations

National Technical University of Athens(雅典国立技术大学)

Giorgos Armeniakos, Alexis Maras, Sotirios Xydis, Dimitrios Soudris

AI总结:

本研究针对嵌入式RISC-V内核混合精度神经网络支持不足的问题,提出软硬件协同设计框架,通过扩展ALU、引入多泵浦与软SIMD优化及定制MAC指令,在准确率损失不足1%时实现15倍能耗降低,性能优于现有最先进RISC-V内核。

摘要:

量化与混合精度方法的最新进展为提升神经网络(NN)的速度和能效提供了大量机遇。研究表明,采用不同低精度的单个参数可达到与全精度参数相当的准确率。然而,现代嵌入式微处理器在指令集架构(ISA)扩展及其支持混合精度操作高效执行的硬件设计方面,对混合精度神经网络的支持非常有限,即因大量数据打包与解包指令、算术单元利用率不足等问题引入了若干性能瓶颈。在本研究中,我们首次整合了专为混合精度硬件优化定制的ISA扩展,目标是在主流RISC-V CPU架构上实现高能效的深度神经网络(DNN)推理。为此,我们提出了一个软硬件协同设计框架,可在周期精确仿真中支持协同硬件设计、混合精度量化、ISA扩展与推理。在硬件层面,我们首先在概念验证微架构中扩展了算术逻辑单元(ALU),以支持可配置的细粒度混合精度算术运算。随后,我们实现了多泵浦技术以最小化执行延迟,并针对2位运算额外应用了软SIMD优化。在ISA层面,我们对三种不同的乘累加(MAC)指令进行编码以扩展RISC-V ISA,并开放至编译器层面,每条指令对应一种不同的混合精度操作模式。我们在广泛使用的DNN和数据集(如CIFAR10和ImageNet)上开展了全面的实验评估,结果表明本框架在准确率损失不到1%的情况下平均可实现15倍的能耗降低,且性能优于不依赖特定ISA的最先进RISC-V内核。

英文摘要:

Recent advancements in quantization and mixed-precision approaches offers substantial opportunities to improve the speed and energy efficiency of Neural Networks (NN). Research has shown that individual parameters with varying low precision, can attain accuracies comparable to full-precision counterparts. However, modern embedded microprocessors provide very limited support for mixed-precision NNs regarding both Instruction Set Architecture (ISA) extensions and their hardware design for efficient execution of mixed-precision operations, i.e., introducing several performance bottlenecks due to numerous instructions for data packing and unpacking, arithmetic unit under-utilizations etc. In this work, we bring together, for the first time, ISA extensions tailored to mixed-precision hardware optimizations, targeting energy-efficient DNN inference on leading RISC-V CPU architectures. To this end, we introduce a hardware-software co-design framework that enables cooperative hardware design, mixed-precision quantization, ISA extensions and inference in cycle-accurate emulations. At hardware level, we firstly expand the ALU unit within our proof-of-concept micro-architecture to support configurable fine grained mixed-precision arithmetic operations. Subsequently, we implement multi-pumping to minimize execution latency, with an additional soft SIMD optimization applied for 2-bit operations. At the ISA level, three distinct MAC instructions are encoded extending the RISC-V ISA, and exposed up to the compiler level, each corresponding to a different mixed-precision operational mode. Our extensive experimental evaluation over widely used DNNs and datasets, such as CIFAR10 and ImageNet, demonstrates that our framework can achieve, on average, 15x energy reduction for less than 1% accuracy loss and outperforms the ISA-agnostic state-of-the-art RISC-V cores.

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

↑