Skip to main content
QUICK REVIEW

[论文解读] An FPGA cached sparse matrix vector product (SpMV) for unstructured computational fluid dynamics simulations

Guillermo Oyarzun, Daniel Peyrolon|arXiv (Cornell University)|Jul 24, 2021
Parallel Computing and Optimization Techniques参考文献 14被引用 4
一句话总结

本文提出一种基于FPGA的缓存稀疏矩阵-向量乘法(SpMV)方法,用于非结构化计算流体动力学(CFD)模拟,采用循环链表缓存以最大化输入向量的重用。通过利用问题特定的稀疏性模式,并借助BRAM缓存优化内存访问,该方法相较于朴素的FPGA实现最高可提升16倍性能,相较于全向量BRAM缓存库最高可提升12倍。

ABSTRACT

Field Programmable Gate Arrays generate algorithmic specific architectures that improve the code's FLOP per watt ratio. Such devices are re-gaining interest due to the rise of new tools that facilitate their programming, such as OmpSs. The computational fluid dynamics community is always investigating new architectures that can improve its algorithm's performance. Commonly, those algorithms have a low arithmetic intensity and only reach a small percentage of the peak performance. The sparse matrix-vector multiplication is one of the most time-consuming operations on unstructured simulations. The matrix's sparsity pattern determines the indirect memory accesses of the multiplying vector. This data path is hard to predict, making traditional implementations fail. In this work, we present an FPGA architecture that maximizes the vector's re-usability by introducing a cache-like architecture. The cache is implemented as a circular list that maintains the BRAM vector components while needed. Following this strategy, up to 16 times of acceleration is obtained compared to a naive implementation of the algorithm.

研究动机与目标

  • 解决非结构化CFD模拟中算术强度低和内存访问模式差的问题,这些问题是CPU和GPU性能受限的原因。
  • 克服非结构化网格SpMV中间接且不可预测的内存访问带来的挑战,这些挑战阻碍了高效硬件映射。
  • 通过利用FPGA的可重构性实现问题特定的SpMV加速,提升高性能计算(HPC)工作负载的能效和性能。
  • 设计一种缓存感知的SpMV架构,最大化输入向量的重用,同时最小化片外内存带宽。
  • 在朴素FPGA实现和现有开源FPGA SpMV库的基础上,展示显著的性能提升。

提出的方法

  • 使用块RAM(BRAM)中的循环链表实现类似缓存的结构,以存储输入向量中频繁访问的元素。
  • 采用按列排序的切片ELLPACK格式存储稀疏矩阵,以实现高效的内存访问模式。
  • 应用预处理步骤,识别并优先处理具有高重用潜力的向量元素,从而减少缓存未命中。
  • 优化缓存大小(16,384个条目)和块大小(每片512行),以在FPGA上的资源使用与性能之间取得平衡。
  • 将SpMV内核集成到OmpSs编程模型中,简化高层编码,并通过Vivado HLS实现自动高层次综合(HLS)编译。
  • 采用基于指令的编程模型,使算法能够以最少的底层硬件设计知识映射到FPGA硬件上。

实验结果

研究问题

  • RQ1如何针对算术强度低且内存访问模式不规则的非结构化CFD模拟,优化基于FPGA的SpMV?
  • RQ2在BRAM中使用循环链表缓存能在多大程度上提升数据重用并减少SpMV内核的片外内存带宽?
  • RQ3与无缓存的朴素FPGA实现相比,所提出的基于缓存的SpMV在性能和资源使用方面表现如何?
  • RQ4所提出的方法是否能超越现有开源FPGA SpMV库(该库将整个输入向量缓存在BRAM中)?
  • RQ5在使用FPGA特定缓存和数据布局优化的情况下,非结构化CFD矩阵的SpMV最大可实现多大速度提升?

主要发现

  • 所提出的基于缓存的SpMV在50K至800K行的矩阵上,相较于朴素FPGA实现最高可实现16.41倍性能提升。
  • 随着矩阵规模增大,性能提升进一步提高,原因在于更大、更稀疏的矩阵在间接内存访问中表现出更强的空间和时间局部性。
  • 与一个将整个输入向量缓存在BRAM中的开源库相比,所提方法在相同测试矩阵上最高可实现12.35倍性能提升。
  • 由于BRAM资源限制,缓存SpMV设计仅支持四个并发实例,而朴素实现最多支持32个,凸显了性能与资源利用率之间的权衡。
  • 最优配置采用16,384个条目(32字)的缓存大小和每片512行的块大小,实现了性能与资源效率的最佳平衡。
  • 该方法在单位功耗性能方面表现出显著可扩展性,适用于CFD领域能效受限的百亿亿次HPC工作负载。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。