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

Implement outer for element-wise functions #1813

Merged
merged 9 commits into from
May 21, 2024
Merged

Implement outer for element-wise functions #1813

merged 9 commits into from
May 21, 2024

Conversation

npolina4
Copy link
Collaborator

@npolina4 npolina4 commented May 8, 2024

Implemented outer for binary element-wise functions.
Updated dpnp.outer by using new ufunc outer (dpnp.multiply.outer)
Added tests for different shape and tests compare for compare with dpnp.outer.

  • 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 May 8, 2024

View rendered docs @ https://intelpython.github.io/dpnp/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.

I have only one general comments that we missed docstring documentation for class of universal function (description of attributes like nin and methods like outer).
But it can be addressed by a separate PR.

dpnp/dpnp_algo/dpnp_elementwise_common.py Outdated Show resolved Hide resolved
dpnp/dpnp_algo/dpnp_elementwise_common.py Show resolved Hide resolved
dpnp/dpnp_algo/dpnp_elementwise_common.py Show resolved Hide resolved
dpnp/dpnp_iface_linearalgebra.py Outdated Show resolved Hide resolved
dpnp/dpnp_iface_linearalgebra.py Outdated Show resolved Hide resolved
dpnp/dpnp_iface_linearalgebra.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.

In general it's quite a mix of updating different functionality in one PR.
It would be much more better to split into 3 parts by affecting functionality, like updates in:

  1. dpnp.flatten
  2. ufunc.outer
  3. dpnp.outer

Or at least it would be very helpful to describe all the changes with more details in the PR's description.

@antonwolfy antonwolfy self-requested a review May 11, 2024 11:10
dpnp/dpnp_algo/dpnp_elementwise_common.py Outdated Show resolved Hide resolved
dpnp/dpnp_algo/dpnp_elementwise_common.py Outdated Show resolved Hide resolved
dpnp/dpnp_algo/dpnp_elementwise_common.py Outdated Show resolved Hide resolved
dpnp/dpnp_algo/dpnp_elementwise_common.py Outdated Show resolved Hide resolved
dpnp/dpnp_iface_linearalgebra.py Outdated 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.

Thank you @npolina4 No more comment from me.
Adding documentation page for ufunc should be handled by a separate PR,

dpnp/dpnp_algo/dpnp_elementwise_common.py Outdated Show resolved Hide resolved
@antonwolfy antonwolfy merged commit d7400a2 into master May 21, 2024
41 of 47 checks passed
@antonwolfy antonwolfy deleted the ufunc_outer branch May 21, 2024 09:36
github-actions bot added a commit that referenced this pull request May 21, 2024
* Add ufunc outer

* Update dpnp.outer

* Changed flatten to ravel in outer function to avoid unnecessary copy

* Update flatten implementation

* Update docs for outer

* address comments

* Update dpnp/dpnp_algo/dpnp_elementwise_common.py

---------

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