Sparse matrix-vector multiplication (SpMxV) is one of the most important computational kernels in scientific computing. It often suffers from poor cache utilization and extra load operations because of memory indirections used to exploit sparsity. We propose alternative data structures, along with reordering algorithms to increase effectiveness of these data structures, to reduce the number of memory indirections. Toledo proposed handling the 1x2 blocks of a matrix separately, doing only one indirection for each block. We propose packing all contiguous nonzeros into a block to reduce the number of memory indirections further. This reduces memory indirections per block to one for the cost of an extra array in storage and a loop during SpMxV. We also propose an algorithm to permute the nonzeros of the matrix into contiguous locations. We state this problem as the traveling salesperson problem and use associated heuristics. Experiments verify the effectiveness of our techniques.
[1]
Ramesh C. Agarwal,et al.
A high performance algorithm using pre-processing for the sparse matrix-vector multiplication
,
1992,
Proceedings Supercomputing '92.
[2]
Joel H. Saltz,et al.
ICASE Report No . 92-12 / iVG / / ff 3 J / ICASE THE DESIGN AND IMPLEMENTATION OF A PARALLEL UNSTRUCTURED EULER SOLVER USING SOFTWARE PRIMITIVES
,
2022
.
[3]
G. Reinelt.
The traveling salesman: computational solutions for TSP applications
,
1994
.
[4]
Sivan Toledo,et al.
Improving the memory-system performance of sparse-matrix vector multiplication
,
1997,
IBM J. Res. Dev..
[5]
Michael B. Giles,et al.
Renumbering unstructured grids to improve the performance of codes on hierarchical memory machines
,
1997
.
[6]
Olivier Temam,et al.
Characterizing the behavior of sparse algorithms on caches
,
1992,
Proceedings Supercomputing '92.