Skip to main content
QUICK REVIEW

[论文解读] FireFly: A High-Throughput Hardware Accelerator for Spiking Neural Networks with Efficient DSP and Memory Optimization

Jindong Li, Guobin Shen|arXiv (Cornell University)|Jan 5, 2023
Advanced Memory and Neural ComputingEngineering被引用 3
一句话总结

FireFly 是一种基于 FPGA 的脉冲神经网络硬件加速器,通过利用 Xilinx DSP48E2 模块实现高效的脉冲-权重累加,并通过统一缓冲区优化内存访问,从而实现高吞吐量。该加速器在资源受限的边缘 FPGA 上以 300 MHz 频率实现 5.53 TOP/s 的性能,为 SNN 加速器的计算密度效率设定了新基准。

ABSTRACT

Spiking neural networks (SNNs) have been widely used due to their strong biological interpretability and high energy efficiency. With the introduction of the backpropagation algorithm and surrogate gradient, the structure of spiking neural networks has become more complex, and the performance gap with artificial neural networks has gradually decreased. However, most SNN hardware implementations for field-programmable gate arrays (FPGAs) cannot meet arithmetic or memory efficiency requirements, which significantly restricts the development of SNNs. They do not delve into the arithmetic operations between the binary spikes and synaptic weights or assume unlimited on-chip RAM resources by using overly expensive devices on small tasks. To improve arithmetic efficiency, we analyze the neural dynamics of spiking neurons, generalize the SNN arithmetic operation to the multiplex-accumulate operation, and propose a high-performance implementation of such operation by utilizing the DSP48E2 hard block in Xilinx Ultrascale FPGAs. To improve memory efficiency, we design a memory system to enable efficient synaptic weights and membrane voltage memory access with reasonable on-chip RAM consumption. Combining the above two improvements, we propose an FPGA accelerator that can process spikes generated by the firing neuron on-the-fly (FireFly). FireFly is the first SNN accelerator that incorporates DSP optimization techniques into SNN synaptic operations. FireFly is implemented on several FPGA edge devices with limited resources but still guarantees a peak performance of 5.53TOP/s at 300MHz. As a lightweight accelerator, FireFly achieves the highest computational density efficiency compared with existing research using large FPGA devices.

研究动机与目标

  • 解决现有基于 FPGA 的 SNN 加速器在算术运算和内存管理方面效率不足的问题。
  • 克服仅依赖逻辑布线实现所导致的性能瓶颈,以及 FPGA 中专用 DSP 模块利用效率低下的问题。
  • 设计一种轻量化、可重构的加速器,适用于片上资源有限的边缘设备。
  • 通过优化 SNN 中的算术运算和内存访问模式,实现高计算密度和高吞吐量。
  • 证明在商用边缘 FPGA 上,针对 FPGA 的优化技术在 SNN 推理中的可行性和优越性。

提出的方法

  • 将通用 SNN 突触运算泛化为与 Xilinx DSP48E2 硬块兼容的多路复用-累加(MAC)操作。
  • 使用 DSP48E2 模块实现脉冲计算,而非通用逻辑布线,以提高时钟频率和能效。
  • 设计分层的突触权重分发系统,以减轻对外部内存带宽的压力。
  • 引入 Psum-Vmem 统一缓冲区,将部分和与膜电位数据合并存储,最大限度减少片上内存占用。
  • 采用单体式流水线化有向阵列架构,通过规则的流水连接提升时序收敛性和可扩展性。
  • 通过针对商用低资源边缘 FPGA 设计实现可重构性,避免依赖大容量片上 RAM。

实验结果

研究问题

  • RQ1如何高效地将 SNN 算术运算映射到 FPGA 的 DSP 硬块上,以提升性能和能效?
  • RQ2何种内存访问模式和数据结构可在支持高并行性的前提下,最小化片上内存使用?
  • RQ3轻量化 SNN 加速器是否能在资源受限的 FPGA 边缘设备上实现高吞吐量,而无需依赖大容量片上内存?
  • RQ4与仅依赖布线的实现相比,FPGA 特定的优化技术——尤其是 DSP48E2 的利用——能在多大程度上提升 SNN 推理性能?
  • RQ5与使用更大或更昂贵 FPGA 芯片的现有 SNN 加速器相比,所提出的加速器在计算密度和性能方面表现如何?

主要发现

  • FireFly 在低资源 FPGA 边缘设备上以 300 MHz 频率实现峰值性能 5.53 TOP/s,其计算密度效率优于现有 SNN 加速器。
  • 使用 DSP48E2 模块进行 SNN 特定算术运算,相比仅依赖布线的实现,可实现更高的时钟频率和更好的能效。
  • Psum-Vmem 统一缓冲区通过合并部分和与膜电位数据,显著降低片上内存消耗,实现资源使用最少的高效内存访问。
  • 分层权重分发系统有效减轻了对外部内存带宽的需求,支持高并行性,同时避免过度依赖片上存储。
  • FireFly 在商用边缘 FPGA 上成功实现时序收敛,在复杂互连和高并行性条件下稳定运行于 300 MHz。
  • 该加速器支持多种深度 SNN 模型在不同数据集上的运行,证明了其可重构性与在真实 SNN 应用中的实用性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。