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 implementation of dpnp.float_power #1957

Merged
merged 8 commits into from
Aug 7, 2024
Merged

Add implementation of dpnp.float_power #1957

merged 8 commits into from
Aug 7, 2024

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Jul 31, 2024

The PR adds implementation of dpnp.float_power functions.

There is no dedicated function added to _ufunc_impl extension but reused _pow functions from dpctl.tensor and from VM extension. The only function which was required to be implemented is _float_power_result_type to redefine a table with supported data types.
Unlike numpy, dpnp.float_power has to support also float32 and complex64 data types. It is done to work on a device without fp64 support,

Third party tests are updated, affected tests are unmuted, new ones are added to cover more use cases.

  • 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 Jul 31, 2024

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

@antonwolfy antonwolfy marked this pull request as ready for review July 31, 2024 20:13
tests/test_umath.py Outdated Show resolved Hide resolved
tests/test_umath.py Show resolved Hide resolved
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev 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 @antonwolfy

@antonwolfy antonwolfy merged commit cfaae8c into master Aug 7, 2024
37 of 45 checks passed
@antonwolfy antonwolfy deleted the impl_float_power branch August 7, 2024 18:00
github-actions bot added a commit that referenced this pull request Aug 7, 2024
* Add implementation of dpnp.float_power()

* Updated third party tests

* Added more tests to cover different scenarios

* Mute back test for dpnp.floor_divide

* Update docstring with another way to state NaN value

* Address comment to update tests cfaae8c
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