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

Roll must reduce shift steps by size along axis #1869

Merged
merged 7 commits into from
Oct 21, 2024

Conversation

oleksandr-pavlyk
Copy link
Collaborator

Closes gh-1857

Test added based on example provided in the issue.

  • 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?
  • If this PR is a work in progress, are you opening the PR as a draft?

Closes gh-1857

Test added based on example provided in the issue.
Copy link

github-actions bot commented Oct 18, 2024

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

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_137 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@coveralls
Copy link
Collaborator

coveralls commented Oct 18, 2024

Coverage Status

coverage: 87.673% (+0.004%) from 87.669%
when pulling bd0c9b2 on bugfix/gh-1857-roll-with-large-shift
into 08605c4 on master.

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_138 ran successfully.
Passed: 893
Failed: 2
Skipped: 119

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems to have introduced a failure in an array API test

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_142 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@oleksandr-pavlyk
Copy link
Collaborator Author

oleksandr-pavlyk commented Oct 18, 2024

This change seems to have introduced a failure in an array API test

@ndgrigorian I have pushed a fix to this issue, and added tests to cover it.

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_143 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_144 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@oleksandr-pavlyk
Copy link
Collaborator Author

Interestingly, I can not reproduce this issue in AWS, neither running an individual test file:

(dev_dpctl) ubuntu@ip-172-31-15-142:~/repos/dpctl$ python -m pytest dpctl/tests/test_usm_ndarray_manipulation.py
============================================================================ test session starts ============================================================================
platform linux -- Python 3.12.4, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/ubuntu/repos/dpctl
configfile: pyproject.toml
collected 266 items

dpctl/tests/test_usm_ndarray_manipulation.py ........................................................................................................................ [ 45%]
..................................................................................................................................................                    [100%]

============================================================================ 266 passed in 4.07s ============================================================================
(dev_dpctl) ubuntu@ip-172-31-15-142:~/repos/dpctl$ sycl-ls
[opencl:cpu][opencl:0] Intel(R) OpenCL, AMD EPYC 7R32 OpenCL 3.0 (Build 0) [2024.18.7.0.11_160000]
(dev_dpctl) ubuntu@ip-172-31-15-142:~/repos/dpctl$ git status
On branch bugfix/gh-1857-roll-with-large-shift
Your branch is up to date with 'origin/bugfix/gh-1857-roll-with-large-shift'.

nothing to commit, working tree clean

nor running the entire test suite:

dpctl/tests/test_utils.py .......                                                                                                                                     [100%]

======================================================== 15852 passed, 1896 skipped, 1 xfailed in 472.32s (0:07:52) =========================================================
(dev_dpctl) ubuntu@ip-172-31-15-142:~/repos/dpctl$

@oleksandr-pavlyk
Copy link
Collaborator Author

Also created test environment from the artifact built by build_linux step of the workflow, and the entire test suite passed in AWS.

Copy link

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_145 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this change out and it seems to be working as expected.

The tests could include one with a very large (in magnitude) negative number but I don't think it's necessary. I did test that case out and it worked as expected too.

LGTM!

Copy link
Collaborator

@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 for resolving the issue @oleksandr-pavlyk

@oleksandr-pavlyk oleksandr-pavlyk merged commit 9eb8f03 into master Oct 21, 2024
49 of 53 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the bugfix/gh-1857-roll-with-large-shift branch October 21, 2024 14:24
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.

dpt.roll does not work with unsigned shift value
4 participants