Skip to content

CUDA Sparse-Matrix Vector Multiplication, using Sliced Coordinate format

Notifications You must be signed in to change notification settings

danghvu/cudaSpmv

Repository files navigation

cudaSpmv

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

Usage examples:

./prep matrix=./samples/test.mtx datatype=float
./spmv matrix=./samples/test.mtx datatype=float vector=./samples/vector.txt outfile=/tmp/output 

Parameters:

Required:

  • matrix: path to the input matrix file stored in Matrix Market Format
  • datatype: float or double

Optional:

  • vector: path to the input vector, default is a unit vector
  • outfile: output file for spmv, will not output by default
  • wdir: working directory (all temporary files and caches are stored here), default is the current directory
  • gpu: id of the GPU to execute, default is 0
  • times: number of SpMV iterations, default is 1, if more than 1 sortcol should be enabled to ensure the same result at the end
  • sortcol: 0|1 set as 1 to permute columns the same as rows (only useful in prep), default is 0
  • sortrow: 0|1 set as 1 force sorting rows, default is 0, however will still sort if rows weights differ by a lot (only useful in prep)

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}
}

About

CUDA Sparse-Matrix Vector Multiplication, using Sliced Coordinate format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published