Skip to content

Conversation

@reazulhoque
Copy link
Contributor

This PR will allow users to compute np.linalg.eig on accelerator devices. We enable this support throught dpnp.

According to https://numpy.org/doc/stable/reference/generated/numpy.linalg.eig.html, NumPy does not order the eigen values. Dpnp provides support of np.linalg.eig through MKL which returns the eigen values in order. To check the correctness of our implementation we have borrowed the check from dpnp, where we sort the eigen values for both our implementation and NumPy's. The eigen vectors are corresponding to each eigen value and we swap the vectors accordingly when we sort the eigen values. The eigen vectors could be in different directions which we correct in our test as well.

@diptorupd @oleksandr-pavlyk Please let me know if the explanation makes sense.

@diptorupd diptorupd merged commit d7a433b into IntelPython:main Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants