Skip to content

Conversation

@npolina4
Copy link
Contributor

@npolina4 npolina4 commented Feb 15, 2024

Reused dpctl.tensor.BinaryElementwiseFunc and dpctl.tensor.UnaryElementwiseFunc classes for DPNPBinaryFunc and DPNPUnaryFunc for using nin and nout property.
Added special classes for dpnp.angle, dpnp.real, dpnp.round, and dpnp.sign because these dpctl.tensor functions has different behavior compared to numpy functions.
Updated all elementwise functions with using new classes.
Updated docs for elementwise functions. Added descriptions for input args.
Added tests.

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2024

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

@antonwolfy
Copy link
Contributor

@npolina4 , could you please add a detailed description to the PR?

@antonwolfy antonwolfy mentioned this pull request Feb 20, 2024
6 tasks
@vtavana
Copy link
Contributor

vtavana commented Feb 22, 2024

Does the absence of the function signature in the documentation align with our intentions with the new approach?

image

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 , I have only minor comment.

@npolina4 npolina4 merged commit 240b14f into master Apr 10, 2024
@npolina4 npolina4 deleted the update_element_wise_func branch April 10, 2024 03:13
github-actions bot added a commit that referenced this pull request Apr 10, 2024
* Implemented nin and nout property for elementwise functions

* address comments

* Apply pylint

* fix tests

* Deleted debugging print

* Added TypeError for functions that do not support bool dtype

* fix typo

* Fixed docstrings for element-wise functions

* Remove call_origin for element-wise functions

* address comments

* Update dpnp_elementwise_common.py

* Fix linalg tests. Fix element-wise docs

* address comments

* Fix tests for Iris Xe

* Improve code coverage

* Update dpnp/dpnp_algo/dpnp_elementwise_common.py

Co-authored-by: Anton <[email protected]>

* fix pre-commit

* fix typo

* Added missing call to _mkl_round_to_call

---------

Co-authored-by: Anton <[email protected]> 240b14f
github-actions bot added a commit to antonwolfy/dpnp that referenced this pull request Apr 10, 2024
…hon#1712)

* Implemented nin and nout property for elementwise functions

* address comments

* Apply pylint

* fix tests

* Deleted debugging print

* Added TypeError for functions that do not support bool dtype

* fix typo

* Fixed docstrings for element-wise functions

* Remove call_origin for element-wise functions

* address comments

* Update dpnp_elementwise_common.py

* Fix linalg tests. Fix element-wise docs

* address comments

* Fix tests for Iris Xe

* Improve code coverage

* Update dpnp/dpnp_algo/dpnp_elementwise_common.py

Co-authored-by: Anton <[email protected]>

* fix pre-commit

* fix typo

* Added missing call to _mkl_round_to_call

---------

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

3 participants