Performance of the load-balanced SpMV kernel for the bmSparse matrix format
The bmSparse format is a bitmap-based sparse matrix storage format originally designed for the sparse matrix-matrix product (SpGeMM) on GPUs. Recently, we proposed a load-balanced SpMV kernel for this format that distributes computation evenly across CUDA blocks, introducing a configuration parameter nBlocks that significantly affects kernel performance. However, after a preliminary evaluation, we could not reach an acceptable automatic criterion for selecting this parameter. In this work, we seek to specify a heuristic that can correctly predict a value of nBlocks which can reach near-optimal execution times, when compared to other possible selections of the same value. We first perform a grid search over fixed nBlocks values on a dataset of 1,189 matrices from the SuiteSparse Matrix Collection, identifying the number of bmSparse blocks as the matrix characteristic most predictive of the optimal value. Then, a linear regression on this characteristic yields the heuristic nBlocks = 11 x sqrt(bmsparse_num_blocks), computable in O(1) time from data already available after matrix loading. We then evaluate the kernel using this heuristic against cuSparse's implementations of CSR, BSR, and SELL. When compared to BSR, bmSparse wins on 54.5% of matrices with a median speedup of 1.470x, while for SELL it wins on 49.9% of the matrices with a median speedup of 0.993x. The CSR implementation consistently outperforms bmSparse, which achieves superlinear speedups on only 0.3% of matrices. Despite this, we identify a practical use case where bmSparse yields lower total execution time than cuSparse CSR, applications where the amount of SpMV operations does not compensate for cuSparse's setup overhead.
Authors
- Ernesto Dufrechou (ORCID: https://orcid.org/0000-0003-4971-340X)
- Gonzalo Berger
- Pablo Ezzatti (ORCID: https://orcid.org/0000-0002-2368-8907)
Institutions
- Universidad de la República de Uruguay (UY)
Publication Details
- Journal
- CLEI electronic journal
- Published
- 2026-11-25
- DOI
- https://doi.org/10.19153/cleiej.29.5.4
- Primary Topic
- Parallel Computing and Optimization Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00