Skip to content
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

Update dpnp.linalg.eig/eigvals #1780

Merged
merged 12 commits into from
Apr 11, 2024
Merged

Update dpnp.linalg.eig/eigvals #1780

merged 12 commits into from
Apr 11, 2024

Conversation

vlad-perevezentsev
Copy link
Collaborator

This PR proposes to update dpnp.linalg.eig() and dpnp.linalg.eigvals() functions using numpy call.
Using numpy.linalg.eig/eigvals is a temporary solution until MKL implements oneapi::mkl::lapack::geev for USM interface.

This PR also removes dpnp_algo_linalg.pyx file because it no longer contains Cython functions

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

@vlad-perevezentsev
Copy link
Collaborator Author

vlad-perevezentsev commented Apr 9, 2024

@antonwolfy also I would also remove the backend implementation of dpnp_eigvals_c and dpnp_eig_c cause it is only implemented for symmetric arrays which is wrong.
What do you think about this?

@antonwolfy
Copy link
Contributor

antonwolfy commented Apr 9, 2024

@antonwolfy also I would also remove the backend implementation of dpnp_eigvals_c and dpnp_eig_c cause it is only implemented for symmetric arrays which is wrong. What do you think about this?

We definitely need to plan a clean up, but I would prefer to do that by a separate PR (like to remove all unused linalg functions from backend at once and so on). But needs to be careful to avoid an unexpected impact on numba-dpex.

Copy link
Contributor

github-actions bot commented Apr 9, 2024

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

dpnp/linalg/dpnp_iface_linalg.py Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Show resolved Hide resolved
Copy link
Contributor

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @vlad-perevezentsev

@vlad-perevezentsev vlad-perevezentsev merged commit ceff0c7 into master Apr 11, 2024
55 of 56 checks passed
@vlad-perevezentsev vlad-perevezentsev deleted the update_eig_eigvals branch April 11, 2024 09:58
github-actions bot added a commit that referenced this pull request Apr 11, 2024
* Remove old impl of dpnp_eig and dpnp_eigvals

* Update dpnp.linalg.eig func

* Update dpnp.linalg.eigvals func

* Update test_sycl_queue with eig and eigvals

* Update test_usm_type.py with eig and eigvals

* Update TestEigenvalue in test_linalg.py

* Remove dpnp_algo_linalg.pyx

* Update docstrings for solve and matrix_power

---------

Co-authored-by: Anton <[email protected]> ceff0c7
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