Skip to content

Update QR tests to avoid element-wise comparisons#2785

Draft
vlad-perevezentsev wants to merge 5 commits intomasterfrom
inskip_qr_tests
Draft

Update QR tests to avoid element-wise comparisons#2785
vlad-perevezentsev wants to merge 5 commits intomasterfrom
inskip_qr_tests

Conversation

@vlad-perevezentsev
Copy link
Contributor

@vlad-perevezentsev vlad-perevezentsev commented Feb 24, 2026

This PR proposes updating QR tests to avoid direct element-wise comparisons which became unstable with oneMKL 2026.0 due to sign and phase differences in otherwise valid QR results

Since QR factorization is not unique, different MKL and NumPy versions may return results that differ by sign or complex phase while still representing a correct decomposition

To make the tests more stable this PR proposes using invariant-based validation for mode="raw" and mode="r" based on the unitarity of the Q factor (Q^H Q = I) and the resulting QR identity
R^H @ R = A^H @ A

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@vlad-perevezentsev vlad-perevezentsev self-assigned this Feb 24, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

Array API standard conformance tests for dpnp=0.20.0dev3=py313h509198e_11 ran successfully.
Passed: 1355
Failed: 2
Skipped: 16

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 81.124%. remained the same
when pulling 8cb6d29 on inskip_qr_tests
into e825de5 on master.

@vlad-perevezentsev vlad-perevezentsev changed the title Unskip qr tests Update QR tests to avoid element-wise comparisons Feb 26, 2026
@github-actions
Copy link
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/2785/index.html

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.

2 participants