perf(lsmr): one true-residual check at a tolerance stop, restart from a refuted one - #388
Merged
Merged
Conversation
This was referenced Sep 22, 2026
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 07:19
b189823 to
c60d4bf
Compare
This was referenced Sep 23, 2026
schroedk
added this pull request to stack #393
September 23, 2026 07:24
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
2 times, most recently
from
September 23, 2026 07:36
3651105 to
ff8530e
Compare
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 13:16
ff8530e to
e379731
Compare
schroedk
removed this pull request from stack #393
September 23, 2026 13:17
schroedk
added this pull request to stack #396
September 23, 2026 13:17
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 13:21
e379731 to
54a9a4b
Compare
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 13:28
54a9a4b to
0dbe057
Compare
schroedk
removed this pull request from stack #396
September 23, 2026 15:05
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 15:06
0dbe057 to
6c7c3e1
Compare
schroedk
added this pull request to stack #398
September 23, 2026 15:06
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 15:19
6c7c3e1 to
1adf4c0
Compare
schroedk
removed this pull request from stack #398
September 23, 2026 15:35
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 15:35
1adf4c0 to
4c0b538
Compare
schroedk
added this pull request to stack #400
September 23, 2026 15:36
schroedk
removed this pull request from stack #400
September 23, 2026 15:51
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 15:52
4c0b538 to
71a43b2
Compare
schroedk
added this pull request to stack #402
September 23, 2026 15:52
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 16:01
71a43b2 to
2a68b54
Compare
…om a refuted one The exit audit recomputed `b − Ax`, `Aᵀr` and `M⁻¹Aᵀr` at every tolerance stop, about 1.5 iterations per solve. A stop is now held to one true-residual evaluation, `‖b − A x‖` against the recurrence's own `‖r_k‖`, and a refuted stop restarts the stream from its iterate, at most twice, before `FalseConvergence`. The `Aᵀr` and `M⁻¹` legs, the certificate and its warm re-base are gone; a warm exit's normal-equation report still divides by `‖Âᵀb‖`, one `Aᵀ` and one `M⁻¹` apply, fixed for the solve so a restarted pass reports against the same quantity. `M⁻¹` must now be nonsingular: a direction it annihilates lies outside the Krylov space, and the singular-preconditioner test flips from refused to certified. Hot loop, measured at d49ffd6 before the stack was split, 8 threads, min of interleaved rounds against v0.3.0: 2M×3FE 10 iterations +0.9% (main +18.1%), 8M×3FE 14 iterations +1.5% (main +13.5%). Smoke suite 94/94 converged.
…terate A `FalseConvergence` result carried the recurrence's refuted estimate as `normal_eq_residual`, often a collapsed ~0 next to `converged = false`. The refused path now seeds once from the staged `b − A x` (one Aᵀ and one M⁻¹ apply, off the converged path) and reports its `‖Âᵀr‖`. The `converged` doc and CHANGELOG say what the one-apply check covers: estimate drift, not drift within `range(A)`. Multi-line doc comments added by the exit rework are collapsed to one line.
schroedk
force-pushed
the
perf/lsmr-exit-cost
branch
from
September 23, 2026 16:10
2a68b54 to
321f243
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 7/9 (feature), based on main (#399 merged). Closes the v0.3.0→main additive solve regression from the #291 exit audit (A + Aᵀ + M⁻¹ apply and serial passes at every tolerance stop, ~1.5 iterations per solve).
‖b − A x‖against the recurrence's own‖r_k‖(fix(lsmr): underflowed norms, Givens update scale, LSMR's own residual estimate #391), slack100·tol·‖b‖. A refuted stop restarts from its iterate, at most twice, thenFalseConvergence.‖Âᵀb‖(one Aᵀ + one M⁻¹ apply), as the Python stubs promise for the Adaptive hand-off.M⁻¹must be nonsingular.range(A); the docs and CHANGELOG say so. test: pin the #286 akm_slopes cell against fake convergence #397's cell stays green.Hot loop, measured before the split, 8 threads, min of interleaved rounds vs v0.3.0: 2M×3FE/10 iters +0.9% (main +18.1%), 8M×3FE/14 iters +1.5% (main +13.5%). Smoke suite 94/94 converged, correctness 8/8.