Skip to content

Fix copy of src with offset #1504

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

Merged
merged 2 commits into from
Jan 25, 2024
Merged

Conversation

oleksandr-pavlyk
Copy link
Contributor

Closes gh-1503

In code copying usm_ndarray into usm_ndarray, when broadcasting rhs to the common shape using usm_ndarray constructor, offset parameter was not being set, causing incorrect behavior reported gh-1503.

This PR specifies the offset parameter, and adds test based on reproducing example of said 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?
  • If this PR is a work in progress, are you opening the PR as a draft?

Copy link

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 90.684%. remained the same
when pulling 5cd7ba2 on fix-copy-of-src-with-offset
into 12cd523 on master.

Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_26 ran successfully.
Passed: 909
Failed: 0
Skipped: 86

Copy link
Contributor

@npolina4 npolina4 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @oleksandr-pavlyk

@oleksandr-pavlyk oleksandr-pavlyk merged commit 8ed8ef2 into master Jan 25, 2024
Copy link

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

@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-copy-of-src-with-offset branch February 2, 2024 01:00
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.

Wrong element copy for 2D array
4 participants