The Compressed Sparse eXtended (CSX) format for sparse matrices is a sparse matrix format that seeks to minimize the memory footprint of the column index array of the typical Compressed Sparse Row (CSR) format by exploiting dense substructures inside the sparse matrix. Instead of storing a single index for every nonzero element of the sparse matrix, CSX stores a short description for each substructure found in the matrix (and selected for encoding). This technique can save significant amount of main memory storage and minimize the bandwidth requirements of the Sparse Matrix-Vector Multiplication (SpMV) kernel. Finally, the CSX format employes runtime code generation (using the
LLVM compiler infrastructure) for emitting optimized SpMV routines for each encoded pattern.
Code
A proof-of-concept implementation of CSX is available for download:
libcsx_v0.2.tar.gz.
Our code can also be found at
https://github.com/cslab-ntua/csx. For questions related to the code (or CSX in general), please contact kkourt at cslab.ece.ntua.gr or bkk at cslab.ece.ntua.gr.
Publications
- V. Karakasis, G. Goumas, K. Nikas, N. Koziris, J. Ruokolainen, and P. Råback, "Using State-of-the-Art Sparse Matrix Optimizations for Accelerating the Performance of Multiphysics Simulations" PARA 2012: Workshop on State-of-the-Art in Scientific and Parallel Computing. Helsinki, Finland, June 10–13, 2012 (pdf)
- K. Kourtis, V. Karakasis, G. Goumas, and N. Koziris, "CSX: An extended compression format for SpMV on shared memory systems," 16th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming (PPoPP'11) San Antonio, TX, USA, February 12–16, 2011 (pdf).
Errata:
The transformation for the anti-diagonal case shown in the PPoPP'11 paper is incorrect. The correct one is:
i' = i + j - 1
j' = i, if i' <= ncols
j' = ncols + 1 - j, if i' > ncols
The transformation shown in the paper is the reverse transformation for the diagonal case.
Code links:
- anti-diagonal (i.e., reverse-diagonal) transformation: pnt_map_rD
- diagonal reverse transformation: pnt_rmap_D
Reported by Xiuxia Zhang