-
Notifications
You must be signed in to change notification settings - Fork 787
Throw when device does not support USM allocation #12446
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
✅ With the latest revision this PR passed the C/C++ code formatter. |
This PR is meant to fix this issue : #9513. |
@againull |
If tests are really relying on the behavior that these functions return nullptr when aspect is not supported then we have to fix all these tests in my opinion. Because such behaviour is not aligned with specification. Per SYCL 2020 spec: malloc_shared: malloc_host: |
@againull Is there someone we can tag to have a closer look at these tests? |
I believe tests need to be fixed/updated in scope of this PR. I don't think it makes sense to ask authors of each test to fix it. We don't have a single person who is responsible for maintaining the tests. |
@againull |
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 with condition that tracker for malloc_shared will be created.
@intel/llvm-gatekeepers Can we get this merged? |
A github issue has been created here: #12490 |
With #12485 merged, I am just retriggering testing for good measure. |
The USM allocation functions are changed to conform with the spec and throw when certain usm allocation modes are not supported.
malloc_shared is left incomplete because it breaks a lot of tests and its more reasonable to handle that in a later PR. In the meantime, malloc_device and malloc_host have been changed to conform with the spec and throw an exception when the corresponding USM aspect is not supported. The test usm_pooling.cpp has also been updated to reflect this query about the memory access properties in the L0 API so that it knows to expect it in the output.