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

dpctl.tensor.abs fixed for signed zeros #1340

Closed
wants to merge 2 commits into from

Conversation

ndgrigorian
Copy link
Collaborator

This PR fixes the behavior of abs for signed zeros.

Previous behavior:

In [1]: import dpctl.tensor as dpt, numpy as np

In [2]: dpt.abs(dpt.asarray(-0.))
Out[2]: usm_ndarray(-0.)

Now:

In [1]: import dpctl.tensor as dpt, numpy as np

In [2]: dpt.abs(dpt.asarray(-0.))
Out[2]: usm_ndarray(0.)
  • 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?
  • If this PR is a work in progress, are you opening the PR as a draft?

@ndgrigorian ndgrigorian changed the title dpctl.tensor.abs now works on signed zeros dpctl.tensor.abs fixed for signed zeros Aug 13, 2023
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 84.95%. remained the same when pulling 76bce68 on fix-abs-negative-zero into 50f1074 on master.

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev2=py310h7bf5fec_5 ran successfully.
Passed: 913
Failed: 87
Skipped: 119

@ndgrigorian
Copy link
Collaborator Author

Superseded by #1343

@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@ndgrigorian ndgrigorian deleted the fix-abs-negative-zero branch August 28, 2023 16:07
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.

None yet

2 participants