-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Add tests for atomic operations on malloc_shared-allocated memory #12480
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
Conversation
This PR so far only contains changes to the 'add' atomic tests to get initial feedback. I will add other tests later so that review feedback won't potentially require all tests to be changed. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
The changes so far look good to me. Only one nit: comments are supposed to be written in proper English, i.e. with proper punctuation. I noticed that you simply copy-pasted the comments from existing tests into the new tests, but can you add the |
732e589
to
ecf148b
Compare
No problem. I've clang-formatted my changes and added |
Yes, that's exactly it, we want to keep the diff simple. |
ecf148b
to
b85d9aa
Compare
@maarquitos14 I have completed the tests for all atomic operations present in the |
b85d9aa
to
830c886
Compare
830c886
to
4c9116c
Compare
Thanks for your comments @maarquitos14, I think I've addressed all of them. |
All atomic tests now seem to be failing on CI (AMD HIP only as far as I can see) with:
This seems to have been introduced by #12700. I'm not sure why this is not supported on AMD HIP, but either way the tests need to be modified to check for shared USM support. |
284dfce
to
07ba3c6
Compare
07ba3c6
to
2c391ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This duplicates existing SYCL atomic tests that use buffers with identical tests that use USM and memory allocated using
sycl::malloc_shared
. The motivation behind exercising atomics onmalloc_shared
-allocated memory is to catch issues such as ROCm/ROCm#848 where native atomic instructions may fail when crossing the PCIe bus.