Performance of CuSparse Dgtsv() (three-diagonal matrices solver).

Hello I am undergraduate student and I am working in scientific research. It includes solving three-diagonal matrices and we chose cuSparse and Tesla C2075 for better performance. But we found that it doesn’t work linearly. For example if choose matrice size = 17 cusparse solves it in 0.4 sec but for size = 18 time is 1.6 sec. Finally we tested cusparse performance for N from 5 to 1000. Y-axis for clocks, X-axis for size of matrice. You can see that time for N = 900 approximately equal to time for N = 230, but it is 3-5 times less than time for N = 500.

UPD: I forgot to say that we measured time for 100 times of execution. So real time is 0.004 and 0.016 seconds.

If the matrices are that small, why are you using cuSPARSE at all? You convert to dense format using cuSPARSE and then use cuBLAS to get the answer and convert back to sparse in less time than 0.4 sec.

I do question that time, what does you nvcc command line look like?

If you have small datasets, there is little sense in using the sparse format, let alone cuSPARSE.