• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2024, Vol. 46 ›› Issue (08): 1340-1348.

• High Performance Computing • Previous Articles     Next Articles

Optimization of sparse matrix-vector multiplication based on FPGA and row folding

ZHOU Zhi,GAO Jian-hua,JI Wei-xing   

  1. (School of Computer Science & Technology,Beijing Institute of Technology,Beijing 100081,China)
  • Received:2023-11-07 Revised:2023-12-29 Accepted:2024-08-25 Online:2024-08-25 Published:2024-09-02

Abstract: Sparse matrix-vector multiplication (SpMV) is a key kernel in scientific and engineering computing. Due to the irregular data distribution in sparse matrices and the irregular memory access operations in SpMV calculations, the performance of SpMV on multicore CPUs and GPUs still lags significantly behind the theoretical peak performance of these devices. Existing CPUs and GPUs are limited in their architectures, making them unable to effectively utilize the special structure of sparse matrices to accelerate SpMV calculations. However, Field-Programmable gate arrays (FPGA) can achieve efficient parallel computing through customized circuits, which better handle the computation and storage issues of sparse matrices. An SpMV optimization method based on FPGA is proposed, which utilizes a high-level synthesis streaming processing engine and employs an adaptive multi-row folding SpMV optimization strategy. This method reduces the ineffective storage and computation of zero elements in the processing engine through row folding, thereby enhancing the performance of FPGA-based SpMV calculations. Experimental results show that compared to existing FPGA implementations, the proposed row folding-based dataflow engine achieves a maximum speedup of 1.78 times and an average speedup of 1.15 times.


Key words: sparse matrix-vector multiplication, field-programmable gate array, high-level synthesis, row folding