arXiv:2509.15187cs.LGcs.AR2025-09中稿 · publication by IEE…被引 1

为RISC-V设计混合精度框架,显著提升神经网络推理速度与能效。

MaRVIn: A Cross-Layer Mixed-Precision RISC-V Framework for DNN Inference, from ISA Extension to Hardware Acceleration

  • 通过可配置的2/4/8位混合精度运算单元优化硬件执行效率。
  • 在CIFAR10/ImageNet上实现平均17.6倍加速,精度损失小于1%。
  • 软SIMD与电压调节等设计适合边缘设备部署的低功耗场景。

量化与混合精度技术的发展为提升神经网络的速度和能效开辟了新路径。尽管现有研究显示,对不同参数采用不同精度可在保持接近全精度模型准确率的同时大幅降低计算需求,但现有嵌入式微处理器在指令集架构扩展与硬件设计方面仍缺乏充分支持,导致数据打包/解包开销大、算术单元利用率低等问题。本文提出新型指令集扩展与微架构实现,专为优化混合精度神经网络执行而设计,构建了名为MaRVIn的跨层软硬件协同框架,通过硬件改进、混合精度量化、指令级优化及周期级仿真,显著提升能效与性能。硬件层面,增强算术逻辑单元支持2/4/8位可配置混合精度运算,并引入多泵送机制降低执行延迟,实现软SIMD以高效处理2位操作;软件层面,集成剪枝感知微调方法优化模型压缩,采用基于贪婪的自动搜索策略寻找帕累托最优的混合量化模型。此外,结合电压调节进一步提升系统能效。在主流深度神经网络与数据集(如CIFAR10、ImageNet)上的实验表明,该框架平均实现17.6倍加速,精度损失低于1%,优于无指令集适配的先进RISC-V核心,最高达1.8 TOPs/W。

原文摘要 · Abstract (English)

The evolution of quantization and mixed-precision techniques has unlocked new possibilities for enhancing the speed and energy efficiency of NNs. Several recent studies indicate that adapting precision levels across different parameters can maintain accuracy comparable to full-precision models while significantly reducing computational demands. However, existing embedded microprocessors lack sufficient architectural support for efficiently executing mixed-precision NNs, both in terms of ISA extensions and hardware design, resulting in inefficiencies such as excessive data packing/unpacking and underutilized arithmetic units. In this work, we propose novel ISA extensions and a micro-architecture implementation specifically designed to optimize mixed-precision execution, enabling energy-efficient deep learning inference on RISC-V architectures. We introduce MaRVIn, a cross-layer hardware-software co-design framework that enhances power efficiency and performance through a combination of hardware improvements, mixed-precision quantization, ISA-level optimizations, and cycle-accurate emulation. At the hardware level, we enhance the ALU with configurable mixed-precision arithmetic (2, 4, 8 bits) for weights/activations and employ multi-pumping to reduce execution latency while implementing soft SIMD for efficient 2-bit ops. At the software level, we integrate a pruning-aware fine-tuning method to optimize model compression and a greedy-based DSE approach to efficiently search for Pareto-optimal mixed-quantized models. Additionally, we incorporate voltage scaling to boost the power efficiency of our system. Our experimental evaluation over widely used DNNs and datasets, such as CIFAR10 and ImageNet, demonstrates that our framework can achieve, on average, 17.6x speedup for less than 1% accuracy loss and outperforms the ISA-agnostic state-of-the-art RISC-V cores, delivering up to 1.8 TOPs/W.

混合精度RISC-V能效优化神经网络推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。