Skip to content

Conversation

@vlad-perevezentsev
Copy link
Contributor

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
Contributor 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.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2024

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

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
@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