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

Fix for crash reported in gh-1654 #1676

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

oleksandr-pavlyk
Copy link
Collaborator

Closes gh-1654

The reason behind the crash was out of bound access to shared local memory accessor.

This also fixes a crash in dpt.sort on CUDA device for sorting of 256 elements of floating point numbers.

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

This also fixes a crash in dpt.sort on CUDA device for sorting
of 256 elements of floating point numbers.
Copy link

github-actions bot commented May 13, 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.17.0dev0=py310h15de555_336 ran successfully.
Passed: 888
Failed: 17
Skipped: 91

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 87.948%. remained the same
when pulling 58dfb5c on fix-for-crash-gh-1654
into 8b42313 on master.

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.

CUDA tests pass, so LGTM. Nice fix to get in this version.

@oleksandr-pavlyk
Copy link
Collaborator Author

The example that was crashing on CUDA device:

import dpctl.tensor as dpt
x = dpt.arange(256, dtype="i4", device="cuda:gpu")
dpt.sort(x, descending=True) # crash

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.

I checked locally DPNP tests relating to sort and argsort functions and they passed without any issue.
Also the gh-issue reported as #1676 isn't reproduced anymore locally for me with the proposed dpctl fix.

Thank you @oleksandr-pavlyk for resolving the issue!

@oleksandr-pavlyk oleksandr-pavlyk merged commit 7bc3124 into master May 14, 2024
57 of 58 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-for-crash-gh-1654 branch May 14, 2024 13:41
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.

Segmentation fault with dpctl.tensor.argsort on CPU device
4 participants