CUDA Sparse-Matrix Vector Multiplication using the Sliced Coordinate format (and others in cusp)
prep
: to partition the input matrix, store the partitioned matrix in binary for faster access
spmv
: perform spmv with prepared files from prep
cusp
: SpMV using cusp library matrix formats
./prep matrix=./samples/test.mtx datatype=float
./spmv matrix=./samples/test.mtx datatype=float vector=./samples/vector.txt outfile=/tmp/output
Required:
matrix
: path to the input matrix file stored in Matrix Market Formatdatatype
:float
ordouble
Optional:
vector
: path to the input vector, default is a unit vectoroutfile
: output file forspmv
, will not output by defaultwdir
: working directory (all temporary files and caches are stored here), default is the current directorygpu
: id of the GPU to execute, default is0
times
: number of SpMV iterations, default is1
, if more than1
sortcol
should be enabled to ensure the same result at the endsortcol
:0|1
set as1
to permute columns the same as rows (only useful inprep
), default is 0sortrow
:0|1
set as1
force sorting rows, default is 0, however will still sort if rows weights differ by a lot (only useful inprep
)
If you use this software for a publication, please cite: https://dl.acm.org/citation.cfm?id=2562941
@article{dang2013cuda,
title={{CUDA}-enabled Sparse Matrix--Vector Multiplication on {GPUs} using atomic operations},
author={Dang, Hoang-Vu and Schmidt, Bertil},
journal={Parallel Computing},
volume={39},
number={11},
pages={737--750},
year={2013},
publisher={Elsevier}
}