arXiv:2504.19659cs.LGcs.AI2025-04被引 13

为FPGA上的稀疏DNN设计了新型RISC-V扩展,实现高效加速。

Hardware/Software Co-Design of RISC-V Extensions for Accelerating Sparse DNNs on FPGAs

  • 利用比特级可配置性,通过权重块预留位编码稀疏信息以跳过计算。
  • 半结构化与非结构化稀疏加速分别提升3倍和4倍性能,联合设计达5倍。
  • 资源开销小,适合在小型FPGA上部署,适用于边缘设备场景。

RISC-V的可定制性使其成为加速深度神经网络(DNN)的理想选择,可通过指令集扩展和相应定制功能单元实现。然而,要有效利用这些优势,需采用软硬件协同设计方法,将DNN模型、软件与硬件共同设计。本文提出针对包含半结构化与非结构化稀疏性的DNN模型的新型RISC-V扩展。针对半结构化稀疏,利用FPGA细粒度(比特级)可配置性,在权重块中预留部分比特用于编码后续块的稀疏信息,自定义功能单元据此跳过无效计算。针对非结构化稀疏,提出可变周期的串行乘累加单元,仅执行非零权重数量的乘法操作。实现的半结构化与非结构化稀疏加速器分别提供最高3倍和4倍加速比,联合设计可达5倍。所提方案仅消耗少量额外FPGA资源,使小型FPGA也能实现DNN加速。我们在标准TinyML应用如关键词识别、图像分类和人体检测上进行了验证。

原文摘要 · Abstract (English)

The customizability of RISC-V makes it an attractive choice for accelerating deep neural networks (DNNs). It can be achieved through instruction set extensions and corresponding custom functional units. Yet, efficiently exploiting these opportunities requires a hardware/software co-design approach in which the DNN model, software, and hardware are designed together. In this paper, we propose novel RISC-V extensions for accelerating DNN models containing semi-structured and unstructured sparsity. While the idea of accelerating structured and unstructured pruning is not new, our novel design offers various advantages over other designs. To exploit semi-structured sparsity, we take advantage of the fine-grained (bit-level) configurability of FPGAs and suggest reserving a few bits in a block of DNN weights to encode the information about sparsity in the succeeding blocks. The proposed custom functional unit utilizes this information to skip computations. To exploit unstructured sparsity, we propose a variable cycle sequential multiply-and-accumulate unit that performs only as many multiplications as the non-zero weights. Our implementation of unstructured and semi-structured pruning accelerators can provide speedups of up to a factor of 3 and 4, respectively. We then propose a combined design that can accelerate both types of sparsities, providing speedups of up to a factor of 5. Our designs consume a small amount of additional FPGA resources such that the resulting co-designs enable the acceleration of DNNs even on small FPGAs. We benchmark our designs on standard TinyML applications such as keyword spotting, image classification, and person detection.

稀疏神经网络FPGA加速RISC-V扩展边缘计算

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