lineax icon indicating copy to clipboard operation
lineax copied to clipboard

Failure to raise error for ill-posed system if using LU and 32-bit

Open johannahaffner opened this issue 5 months ago • 2 comments

When using AutoLinearOperator with well_posed=True and no tags specifying some structure, the LU solver is used.

LU wraps the jax.scipy implementation and raises an error if the output has NaN or +/- inf values. However, jsp.linalg.lu_solve will not necessarily return a vector with such values for an ill-posed problem, unless one uses double-precision: https://github.com/google/jax/issues/23626 If there is no fix in JAX itself, then we could check if the solution is valid and throw an error if it's not.

I am using SVD for that particular problem anyway, but wanted to note this here since AutoLinearSolver promises to raise an error for ill-posed problems.

johannahaffner avatar Sep 13 '24 13:09 johannahaffner