Skip to content

test: use consistent JIT variants in solver invariants - #1234

Open
sylvesterkaczmarek wants to merge 1 commit into
gchq:mainfrom
sylvesterkaczmarek:feature/consistent-jit-solver-tests
Open

sylvesterkaczmarek wants to merge 1 commit into
gchq:mainfrom
sylvesterkaczmarek:feature/consistent-jit-solver-tests

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

PR Type

  • Tests

Description

Ensures solver invariant checks recompute solver results with the same JIT variant used for the result under test.

The JIT wrapper is now threaded through check_solution_invariants and its overrides, including padding-invariance and recombination-specific recomputations. This avoids comparing a JIT-produced coreset against a separately recomputed non-JIT result, which can differ slightly across devices.

Closes #1067.

How Has This Been Tested?

  • uv run pytest tests/unit/test_solvers.py — 414 tests passed
  • uv run pre-commit run --files tests/unit/test_solvers.py CHANGELOG.md — all hooks passed, including ruff, pyright, pylint, cspell and copyright checks
  • git diff --check

Existing parametrised tests pass for both JIT and non-JIT variants.

Does this PR introduce a breaking change?

No. This only changes test infrastructure and the changelog.

Checklist before requesting a review

  • I have made sure that my PR is not a duplicate.
  • My code follows the style guidelines of this project.
  • I have ensured my code is easy to understand, including docstrings and comments where necessary.
  • I have performed a self-review of my code.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • I have updated CHANGELOG.md, if appropriate.

@tm91236 tm91236 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution, LGTM.

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Thanks for the review and approval. Appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistency in handling of JIT variants in solver tests

2 participants