Repository navigation
Add a deterministic minres test for the eps stopping criterion - #3105
Open
antonwolfy wants to merge 1 commit into
Open
antonwolfy wants to merge 1 commit into
antonwolfy wants to merge 1 commit into
Conversation
The istop = 3 branch of minres was reached only by test_minres_x0_exact_solution, where the initial residual is rounding noise of the same order as the eps threshold. Whether it was hit depended on the runner, so Coveralls flipped by one line (-0.003%) on PRs with no source change. The new test uses a singular A with a large x0 in its null space and a tiny b. All values are exact in fp64 and the eps test passes by a factor of 2**27, so the branch is always reached.
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
October 15, 2026 10:13
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/3105/index.html |
Collaborator
Contributor
|
Array API standard conformance tests for dpnp=0.21.0dev14=np2py314h8d9cdd5_5 ran successfully. |
This branch has not been deployed
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.
The
istop = 3branch ofminres(_iterative.pyL859, theepsx >= beta1stopping test) is reached only bytest_minres_x0_exact_solution. Therex0is the exact solution, so the initial residualbeta1is rounding noise (~1.5e-16) of the same order asepsx(~2e-16), and whether the branch is hit depends on the runner.That is why Coveralls flips by one line currently on PRs with no source change.
This PR adds
test_minres_x0_null_space, which uses a singularA = [[1, 0], [0, 0]], a largex0 = [0, 2**40]in its null space and a tinyb = 2**-40. All values are exact in fp64 andepsx / beta1 = 2**27, so the branch is always reached. The result matches SciPy'sminresfor the same input.