Skip to content

Use oneMKL LAPACK gesv for dpnp.linalg.solve() #2558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

vlad-perevezentsev
Copy link
Collaborator

This PR suggests using oneMKL LAPACK gesv instead of getrf and getrs in dpnp.linalg.solve() since the issues in oneMKL have been resolved. This removes the workaround implemented in #1763

  • 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?

Copy link
Contributor

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

Copy link
Contributor

github-actions bot commented Aug 14, 2025

Array API standard conformance tests for dpnp=0.19.0dev3=py313h509198e_15 ran successfully.
Passed: 1226
Failed: 1
Skipped: 9

@vlad-perevezentsev vlad-perevezentsev self-assigned this Aug 18, 2025
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 71.783% (-0.3%) from 72.126%
when pulling a9fa229 on use_gesv_solve
into ac795ab on master.

@vlad-perevezentsev
Copy link
Collaborator Author

Coverage decrease is expected.
getrs function will be used in the future implementation of dpnp.linalg.lu_solve

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

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

Seems to be having stability issues on Level Zero, internal CI shows it in TestSolve

@vlad-perevezentsev can you investigate if this is acceptable level of error and loosen the test if it is, and otherwise, look at it?

@vlad-perevezentsev
Copy link
Collaborator Author

@ndgrigorian Thank you for noticing this!
This is a typical mistake in tests on machines that do not support 64-bit floating point operations.
It is more correct to use assert_dtype_allclose there.
I have fixed that.

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.

4 participants