3 ms·
If you have many right hand sides, you could also compute an LU factorization and then solve the right hand sides via back-substitution. https://docs.cupy.dev/
by johndough 2y ago
If you have many right hand sides, you could also compute an LU factorization and then solve the right hand sides via back-substitution.
https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.linalg.lu_factor.html https://docs.cupy.dev/en/stable/reference/generated/cupyx.sc...
or https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.sparse.linalg.factorized.html#cupyx.scipy.sparse.linalg.factorized https://docs.cupy.dev/en/stable/reference/generated/cupyx.sc... if your linear system is sparse.
But whether that works well depends on the problem you are trying to solve.
- bee_rider 2y agoMy systems are sparse, but might not fit on the GPU when factorized. Actually, usually I do CPU stuff with lots of ram, and Pardiso, so it isn’t an issue. But I was hoping to try out something like ILU+bicgstab on the GPU and the python-verse seems like it has the lowest barrier-to-entry for just playing around.
- johndough 2y agoFor my tasks, I had some success with algebraic multigrid solvers as preconditioner, for example from AMGCL or PyAMG. They are also reasonably easy to get started with. https://github.com/pyamg/pyamg https://github.com/pyamg/pyamg https://github.com/ddemidov/amgcl https://github.com/ddemidov/amgcl But I only have to deal with positive definite systems, so YMMV. I am not sure whether those libraries can deal with multiple right-hand sides, but most complexity is in the preconditioners anyway.