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

Add dpnp.linalg.pinv() implementation #1704

Merged
merged 24 commits into from
Feb 16, 2024
Merged

Add dpnp.linalg.pinv() implementation #1704

merged 24 commits into from
Feb 16, 2024

Conversation

vlad-perevezentsev
Copy link
Collaborator

This PR adds a new dpnp.linalg.pinv() function to calculate the (Moore-Penrose) pseudo-inverse of input arrray using dpnp.linalg.svd() and dpnp.matmul()
The changes are related to support of all types and support of function arguments as hermitian

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

Copy link
Contributor

github-actions bot commented Feb 9, 2024

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

dpnp/linalg/dpnp_utils_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_utils_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_utils_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_utils_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_iface_linalg.py Outdated Show resolved Hide resolved
dpnp/linalg/dpnp_utils_linalg.py Outdated Show resolved Hide resolved
tests/test_usm_type.py Outdated Show resolved Hide resolved
tests/test_usm_type.py Outdated Show resolved Hide resolved
tests/test_sycl_queue.py Outdated Show resolved Hide resolved
tests/test_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.

Due to some reason there are changes from other PRs on the branch, hard to review. Btw, I don't have more comments. Thank you @vlad-perevezentsev !

tests/test_usm_type.py Outdated Show resolved Hide resolved
@vlad-perevezentsev vlad-perevezentsev merged commit 2c38ae8 into master Feb 16, 2024
45 checks passed
@vlad-perevezentsev vlad-perevezentsev deleted the impl_pinv branch February 16, 2024 12:39
github-actions bot added a commit that referenced this pull request Feb 16, 2024
* Impl dpnp.linalg.pinv()

* Add cupy tests for dpnp.linalg.pinv()

* Add tests to test_sycl_queue and test_usm_type

* Add TestPinv to test_linalg.py

* Add additional checks for rcond parameter

* Add a more efficient implementation

* Use numpy.random.seed in test_linalg

* Use setup_method to ruduce code duplication in test_linalg

* Change the seed number

* Use numpy.random.seed in test_usm_type and test_sycl_queue

---------

Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com> 2c38ae8
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