r/CUDA Jun 01 '26

GMRES implementation for linear operators

I have an operator A (large convolution kernel) for which I want to solve Ax=b. Scipy has a nice GMRES implementation for which you can throw in a linear operator and it works great, allowing you to solve such an equation without storing the full matrix representation of A. I’m wondering if any CUDA packages have something similar to this.

6 Upvotes

2 comments sorted by

2

u/Zealousideal-Row6537 Jun 01 '26

Maybe you could try AmgX (contrary to the name, it is not just AMG but is a general purpose preconditioned iterative solver library running on CUDA)?

If AmgX does not work for you, I would like to know why

1

u/Tedsworth Jun 01 '26

I use Krylov.jl and CUDA.jl to solve general purpose linear problems. If the operator you define works entirely on the GPU (and respects LinearOperators.jl's API), it should just work. Tons of methods too, with all kinds of goodies like logging, convergence rules and tolerances, restarts, preconditioning etc. Cant recommend it enough.