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 support CFD for dpnp.isclose and dpnp.allclose functions #1937

Merged
merged 11 commits into from
Jul 26, 2024

Conversation

npolina4
Copy link
Collaborator

@npolina4 npolina4 commented Jul 18, 2024

Implement support CFD for dpnp.isclose and dpnp.allclose functions.
Cleaned up legacy logic implementation from the backend.
Added test.

Performance table:

np.isclose(a, b)
  float 32     float 64  
Size numpy dpnp cpu dpnp gpu numpy dpnp cpu
10.000 0.0001 0.001 0.001 0.0001 0.001
100.000 0.0009 0.004 0.002 0.0007 0.003
1.000.000 0.0035 0.0033 0.002 0.0061 0.0055
10.000.000 0.04 0.03 0.02 0.06 0.03 0.06 0.05 0.03
100.000.000 0.39 0.26 0.23 0.50 0.33 0.58 0.45 0.37
134.217.728 (M) 0.52 0.34 0.29 0.67 0.43 0.77 0.59 0.52
  • 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 22, 2024

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

dpnp/backend/kernels/dpnp_krnl_logic.cpp Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Outdated Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Outdated Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Outdated Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Outdated Show resolved Hide resolved
tests/test_logic.py Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Show resolved Hide resolved
dpnp/dpnp_iface_logic.py Outdated Show resolved Hide resolved
npolina4 and others added 3 commits July 24, 2024 08:13
Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com>
Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com>
antonwolfy
antonwolfy previously approved these changes Jul 24, 2024
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 comments from me.

@antonwolfy antonwolfy dismissed their stale review July 24, 2024 18:19

Need to investigate failing tests

@antonwolfy antonwolfy merged commit ad40e9f into master Jul 26, 2024
38 of 45 checks passed
@antonwolfy antonwolfy deleted the impl_isclose_allclose branch July 26, 2024 18:26
github-actions bot added a commit that referenced this pull request Jul 26, 2024
…1937)

* Added support CFD for dpnp.isclose and dpnp.allclose functions

* Applied review comments

* Update dpnp/dpnp_iface_logic.py

Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com>

* Update dpnp/dpnp_iface_logic.py

Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com>

* Fix pre-commit

* fix isclose for mix dtype input

* Applied review comments

---------

Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com> ad40e9f
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