How to use cusparse's factorization methods?

Hey there,

I was wondering how to time the factorization step for the cusparse api. I am trying to time each phases of the solver - analysis, factorization and solve. I find that cusparse got cusparseSpSV_analysis() and cusparseSpSv_solve() that I am able to use in my Cuda C code to time it. I can only see deprecated methods for factorization like the csrilu02(), which is an incomplete LU factorization based method.
Is there a way to time the actual factorization time of the solver? Are there alternatives to the now deprecated csrilu02 method for factorization? If not, is it possible to use csrilu02 in my code to time the solver’s factorization phase?
Thanks,

sr7

cuSPARSE does not have any factorization routines, except for the deprecated incomplete factorizations. They do not have replacements at this time. They will not be removed until there is an appropriate replacement. You’re certainly welcome to use the deprecated incomplete factorization routines, and time them.

If you’re looking for a sparse direct solver, it is not in cuSPARSE. It is in cuDSS. cuDSS | NVIDIA Developer

1 Like

Thanks for the response @eedwards. I have one final question. Is it possible to mix cusparseSpSV_analysis() and cusparseSpSV_solve() with the deprecated csrilu02() or should csrilu02 be used only with cusparseDcsrilu02_analysis(), which again is a deprecated method? Please let me know

Thanks,

sr7

Hi @sr7ramcanbe.reached . cusparseSpSV and csrilu02 are different APIs (Generic and Legacy). You can’t use the analysis result of one API for the other.

1 Like

Thank you @qanhpham

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.