CUDA Sparse-Matrix Vector Multiplication using the Sliced Coordinate format
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
)