Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Rework implementation of dpnp.unwrap function#1950

Merged
antonwolfy merged 10 commits intomasterIntelPython/dpnp:masterfrom
impl-unwrapIntelPython/dpnp:impl-unwrapCopy head branch name to clipboard
Aug 2, 2024
Merged

Rework implementation of dpnp.unwrap function#1950
antonwolfy merged 10 commits intomasterIntelPython/dpnp:masterfrom
impl-unwrapIntelPython/dpnp:impl-unwrapCopy head branch name to clipboard

Conversation

@antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Jul 26, 2024

The PR proposes to rework implementation of dpnp.unwrap function which are quite limited now.
Added support for all keywords provided by numpy.unwrap.

The page with a table of mathematical functions is aligned with actual numpy content.
The all affected tests are updated to cover different 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?

@antonwolfy antonwolfy self-assigned this Jul 26, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2024

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

dpnp/dpnp_iface_trigonometric.py Outdated Show resolved Hide resolved
tests/test_mathematical.py Outdated Show resolved Hide resolved
tests/test_mathematical.py Outdated Show resolved Hide resolved
@antonwolfy
Copy link
Contributor Author

The timing on PVC with the following example:

a = numpy.random.rand(10**6).astype(dtype) * 1000
_ = numpy.unwrap(a, period=355)

ia = dpnp.array(a)
b = dpnp.unwrap(ia, period=355); b.sycl_queue.wait()

in the table below

dtype numpy dpnp CPU dpnp GPU
f8 30.8 ms 14.9 ms 1.97 ms
f4 27.6 ms 11.5 ms 1.39 ms
i8 11.8 ms 11.2 ms 1.96 ms
i4 11.2 ms 8.63 ms 1.31 ms

@vlad-perevezentsev vlad-perevezentsev self-requested a review August 2, 2024 17:20
Copy link
Contributor

@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.

Looks good!
Thank you @antonwolfy

@antonwolfy antonwolfy merged commit d2c623b into master Aug 2, 2024
@antonwolfy antonwolfy deleted the impl-unwrap branch August 2, 2024 17:23
github-actions bot added a commit that referenced this pull request Aug 2, 2024
* Align doc page of Mathematical functions with numpy

* Implement dpnp.unwrap() function

* Enable muted tests

* Add more tests

* Resolve pre-commit issue

* Apply suggestions from code review

Co-authored-by: vtavana <120411540+vtavana@users.noreply.github.com>

* Replace dpnp.copyto with dpnp.where

---------

Co-authored-by: vtavana <120411540+vtavana@users.noreply.github.com> d2c623b
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.