Skip to content

Conversation

vlad-perevezentsev
Copy link
Contributor

This PR suggests updating dpnp.isclose() function adding a scalar-specific SYCL kernels for both contiguous and stride cases to improve performance when rtol and atol are scalars.
Also extends and updates tests for dpnp.isclose()

The new kernel improves performance by up to 10x compared to the previous implementation when rtol and atol are scalars (tested on PVC).

CPU results:
image

GPU results:
image

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an 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?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

Copy link
Contributor

github-actions bot commented Jul 25, 2025

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

Copy link
Contributor

github-actions bot commented Jul 25, 2025

Array API standard conformance tests for dpnp=0.19.0dev3=py313h509198e_61 ran successfully.
Passed: 1227
Failed: 0
Skipped: 9

@antonwolfy antonwolfy added this to the 0.19.0 release milestone Jul 29, 2025
@coveralls
Copy link
Collaborator

coveralls commented Jul 30, 2025

Coverage Status

coverage: 71.582% (-0.3%) from 71.848%
when pulling 161a8ec on update_isclose
into 6d339e9 on master.

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 @vlad-perevezentsev for implementing the significant performance improvement. No more comments from me.

@antonwolfy antonwolfy merged commit c9b9f70 into master Sep 5, 2025
66 of 72 checks passed
@antonwolfy antonwolfy deleted the update_isclose branch September 5, 2025 09:03
github-actions bot added a commit that referenced this pull request Sep 5, 2025
This PR suggests updating `dpnp.isclose()` function adding a
scalar-specific SYCL kernels for both contiguous and stride cases to
improve performance when `rtol` and `atol` are scalars.
Also extends and updates tests for `dpnp.isclose()`

The new kernel **improves performance** by **up to 10x** compared to the
previous implementation when `rtol` and `atol` are scalars (tested on
PVC). c9b9f70
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