This is the source code of the paper
Weifeng Liu and Brian Vinter, "Speculative Segmented Sum for Sparse Matrix-Vector Multiplication on Heterogeneous Processors". Parallel Computing, 2015. (accepted April 2015) [pdf]
Contact: Weifeng Liu and Brian Vinter (vinter at nbi.ku.dk).
Our algorithm has been implemented on three heterogeneous processors from Intel, AMD and nVidia. See below for a guide on how to benchmark our code.
- Prerequisites
-
Processor: Intel Broadwell (the 5th generation processor, e.g., Intel Core i3-5010U) or above,
-
OS: Microsoft Windows 7 or above,
-
Other tools: Intel OpenCL SDK with OpenCL 2.0 support, Microsoft Visual Studio 2012 or above.
- Benchmarking
-
Open Visual Studio solution
spmv_opencl_intel.sln
in folderspmv_opencl_intel
. -
Make sure
Debug
andx64
in the Visual Studio IDE are selected. -
Build the project.
-
Got to folder
x64/Debug
and run the generated executable file with an argument (filename of the benchmark matrix in the Matrix Market format). E.g.,spmv.exe D:\matrices\filename.mtx
.
- Prerequisites
-
Processor: AMD Kaveri (e.g., AMD A10-7850K) or above,
-
OS: Ubuntu or other Linux versions,
-
Other tools: AMD GPU driver with OpenCL 2.0 support, AMD APP SDK 3.0 Beta or above.
- Benchmarking
-
Make sure
Makefile
in folderspmv_opencl_amd
has corrected paths. -
Run
make USE_DOUBLE=0
ormake USE_DOUBLE=1
for building single precision or double precision SpMV. -
Run the generated executable file with an argument (filename of the benchmark matrix in the Matrix Market format). E.g.,
./spmv /home/user/Downloads/matrices/filename.mtx
.
- Prerequisites
-
Processor: nVidia Tegra K1 or above,
-
OS: Ubuntu Linux 14.04 or above,
-
Other tools: nVidia GPU driver r19.2 or above, CUDA SDK 6.0 or above.
- Benchmarking
-
Make sure
Makefile
in folderspmv_cuda
has corrected paths. -
Make sure
Makefile
has proper shader model (e.g.,-arch=sm_32
) for nvcc compiler. -
Run
make USE_DOUBLE=0
ormake USE_DOUBLE=1
for building single precision or double precision SpMV. -
Run the generated executable file with an argument (filename of the benchmark matrix in the Matrix Market format). E.g.,
./spmv /home/user/Downloads/matrices/filename.mtx
.