A New Diagonal Blocking Format and Model of Cache Behavior for Sparse Matrices

  • Pavel Tvrdík
  • Ivan Šimeček
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3911)


Algorithms for the sparse matrix-vector multiplication (shortly SpM × V) are important building blocks in solvers of sparse systems of linear equations. Due to matrix sparsity, the memory access patterns are irregular and the utilization of a cache suffers from low spatial and temporal locality. To reduce this effect, the diagonal register blocking format was designed. This paper introduces a new combined format, called CARB, for storing sparse matrices that extends possibilities of the diagonal register blocking format.

We have also developed a probabilistic model for estimating the numbers of cache misses during the SpM × V in the CARB format. Using HW cache monitoring tools, we compare the predicted numbers of cache misses with real numbers on Intel x86 architecture with L1 and L2 caches. The average accuracy of our analytical model is around 95% in case of L2 cache and 88% in case of L1 cache.


Nonzero Element Sparse Matrix Diagonal Block Sparse Matrice Array Block 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Mellor-Crummey, J., Garvin, J.: Optimizing sparse matrix vector product computations using unroll and jam. International Journal of High Performance Computing Applications 18(2), 225–236 (2004)CrossRefGoogle Scholar
  2. 2.
    Tvrdík, P., Šimeček, I.: Analytical modeling of sparse linear code. PPAM 12(4), 617–629 (2003)MATHGoogle Scholar
  3. 3.
    Tvrdík, P., Šimeček, I.: Software cache analyzer. In: Proceedings of CTU Workshop, Prague, Czech Republic, March 2005, vol. 9, pp. 180–181 (2005)Google Scholar
  4. 4.
    Vuduc, R., Demmel, J.W., Yelick, K.A., Kamil, S., Nishtala, R., Lee, B.: Performance optimizations and bounds for sparse matrix-vector multiply. In: Proceedings of Supercomputing 2002, Baltimore, MD, USA (November 2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Pavel Tvrdík
    • 1
  • Ivan Šimeček
    • 1
  1. 1.Department of Computer Science and EngineeringCzech Technical UniversityPragueCzech Republic

Personalised recommendations