ASA: A ccelerating S parse A ccumulation in Column-wise SpGEMM
Open Access
- 16 September 2022
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Architecture and Code Optimization
- Vol. 19 (4) , 1-24
Abstract
Sparse linear algebra is an important kernel in many different applications. Among various sparse general matrix-matrix multiplication (SpGEMM) algorithms, Gustavson’s column-wise SpGEMM has good locality when reading input matrix and can be easily parallelized by distributing the computation of different columns of an output matrix to different processors. However, the sparse accumulation (SPA) step in column-wise SpGEMM, which merges partial sums from each of the multiplications by the row indices, is still a performance bottleneck. The state-of-the-art software implementation uses a hash table for partial sum search in the SPA, which makes SPA the largest contributor to the execution time of SpGEMM. There are three reasons that cause the SPA to become the bottleneck: (1) hash probing requires data-dependent branches that are difficult for a branch predictor to predict correctly; (2) the accumulation of partial sum is dependent on the results of the hash probing, which makes it difficult to hide the hash probing latency; and (3) hash collision requires time-consuming linear search and optimizations to reduce these collisions require an accurate estimation of the number of non-zeros in each column of the output matrix. This work proposes ASA architecture to accelerate the SPA. ASA overcomes the challenges of SPA by (1) executing the partial sum search and accumulate with a single instruction through ISA extension to eliminate data-dependent branches in hash probing, (2) using a dedicated on-chip cache to perform the search and accumulation in a pipelined fashion, (3) relying on the parallel search capability of a set-associative cache to reduce search latency, and (4) delaying the merging of overflowed entries. As a result, ASA achieves an average of 2.25× and 5.05× speedup as compared to the state-of-the-art software implementation of a Markov clustering application and its SpGEMM kernel, respectively. As compared to a state-of-the-art hashing accelerator design, ASA achieves an average of 1.95× speedup in the SpGEMM kernel.Keywords
This publication has 49 references indexed in Scilit:
- Sparse matrix multiplication: The distributed block-compressed sparse row libraryParallel Computing, 2014
- ZSimACM SIGARCH Computer Architecture News, 2013
- Parallel Sparse Matrix-Matrix Multiplication and Indexing: Implementation and ExperimentsSIAM Journal on Scientific Computing, 2012
- The Combinatorial BLAS: design, implementation, and applicationsThe International Journal of High Performance Computing Applications, 2011
- A performance counter architecture for computing accurate CPI componentsACM SIGPLAN Notices, 2006
- PinACM SIGPLAN Notices, 2005
- Fast Sparse Matrix-Vector Multiplication by Exploiting Variable Block Structure2005
- Amazon.com recommendations: item-to-item collaborative filteringIEEE Internet Computing, 2003
- Sparse Matrices in MATLAB: Design and ImplementationSIAM Journal on Matrix Analysis and Applications, 1992
- Two Fast Algorithms for Sparse Matrices: Multiplication and Permuted TranspositionACM Transactions on Mathematical Software, 1978