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

Tests to increase coverage of _clip.py #1451

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

oleksandr-pavlyk
Copy link
Collaborator

Added two tests to improve coverage of _clip.py.

  • 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?

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_51 ran successfully.
Passed: 935
Failed: 65
Skipped: 119

@oleksandr-pavlyk oleksandr-pavlyk merged commit 37210ec into implement-clip Oct 23, 2023
26 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the grow-clip-coverage branch October 23, 2023 16:34
@github-actions
Copy link

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

ndgrigorian added a commit that referenced this pull request Oct 25, 2023
* Implements dpctl.tensor.clip

* Clip now consistently yields max where max < min

sycl::clamp would yield max or min depending on the platform

A test has been added for this behavior

* Adds more tests for clip

* Removed redundant branches in clip and elementwise function calls

As the result dtype of the out array is already checked when overlap is checked, checking again later is superfluous

* Removed more redundant logic from clip

* Fixed order logic in clip

Now properly accounts for all three arrays in all branches

* Adds more compute follows data tests for clip

* Tests to increase coverage of _clip.py (#1451)

* Clip raises ValueError when types cannot be resolved

---------

Co-authored-by: Oleksandr Pavlyk <oleksandr.pavlyk@intel.com>
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