Slow SpMV (sparse matrix vector product) performance

4 visualizaciones (últimos 30 días)
Zheng Gu
Zheng Gu el 21 de Mayo de 2015
Respondida: Zheng Gu el 22 de Mayo de 2015
In R2014b, I am performing many SpMV operations using a sparse complex banded matrix with 9 elements per row, grouped in triplets (one triplet is a tridiagonal), and a dense complex vector with about 4 million elements. For some reason, it is extremely slow, taking around 10 seconds to do one on my Core i7 (2.66Ghz quad core) in Win7 x64. I've seen the CUDA libraries for SpMV, but do not have the parallel computing toolbox. Is there anything better to do than just a A*b to try to improve the awful performance?
Edit: I tried this individual command in the MATLAB console and it is about 30x faster (just over 0.3 seconds)! E.g., in my script, I have:
while x
tic
y = A*b;
toc
% other code
end
And in the console I have: tic; y=A*b; toc; And there is a 30x difference between the two. This is consistent and reproducible, but makes no sense to me. If anything, shouldn't the m-file be faster?

Respuesta aceptada

Zheng Gu
Zheng Gu el 22 de Mayo de 2015
Issue solved. This was a memory problem. I had used too much memory in the script and MATLAB needed to copy the data from the swap file in order to perform the SpMV.

Más respuestas (0)

Categorías

Más información sobre GPU Computing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by