cai4cai / torchsparsegradutils

A collection of utility functions to work with PyTorch sparse tensors
Apache License 2.0
24 stars 3 forks source link

[Feature] Add dependency-free GMRES #55

Open tvercaut opened 1 month ago

tvercaut commented 1 month ago

Copy-pasting from wikipedia:

In contrast to the popular CG method, the MINRES method does not assume that the matrix is positive definite, only the symmetry of the matrix is mandatory.

GMRES vs. MINRES The GMRES method is essentially a generalization of MINRES for arbitrary matrices.

It would be nice to provide an dependency-free implementation of GMRES here. It could be ported from COLA: https://github.com/wilson-labs/cola/blob/main/cola/linalg/inverse/gmres.py

It should be noted that GMRES is already available in this repo through JAX or CUPY bindings: