-
Notifications
You must be signed in to change notification settings - Fork 114
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
Check for support of specific type of USM in tests #420
Conversation
@SergeyKopienko, could you review this patch? |
@dmitriy-sobolev, please rebase from main this branch. |
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.
Please rebase your branch from main
@@ -117,6 +117,10 @@ void test2_with_buffers() | |||
void test_with_usm() | |||
{ | |||
cl::sycl::queue q; | |||
|
|||
if(!TestUtils::has_aspect(q.get_device(), sycl::aspect::usm_shared_allocations)) | |||
return; |
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.
I think that this function should should become boolean. And when we return from this function, we should return as in skip test vase from main.
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.
The buffers will be tested even If test_with_usm
is skipped. Given that modifying return seems unnecessary.
Do you think there should be a notification that the test case with USM has been skipped (e.g. via some message in the output)?
@@ -119,6 +119,10 @@ void test_with_buffers() | |||
void test_with_usm() | |||
{ | |||
sycl::queue q; | |||
|
|||
if(!TestUtils::has_aspect(q.get_device(), sycl::aspect::usm_shared_allocations)) |
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.
I think that this function should should become boolean. And when we return from this function, we should return as in skip test vase from main.
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.
Let's continue discussion on the same issue in this thread: #420 (comment)
e681327
to
a03ba23
Compare
Signed-off-by: Sobolev, Dmitriy <[email protected]>
Signed-off-by: Sobolev, Dmitriy <[email protected]>
* Rebase * Add const to sycl::exception and log it * Map sycl::usm::alloc to usm sycl::aspect Signed-off-by: Sobolev, Dmitriy <[email protected]>
a03ba23
to
af3d153
Compare
Signed-off-by: Sobolev, Dmitriy <[email protected]>
* Apply fixes required after rebasing Signed-off-by: Sobolev, Dmitriy <[email protected]>
Remove extra line
Signed-off-by: Sobolev, Dmitriy <[email protected]>
The PR is outdated, and I do not deem it to be worth of revival. More tests have been added which rely on USM only: they need to be rewritten using SYCL buffers. That's a lot of work not connected to the changes here, hence it is better to start from scratch. I've created an issue for it: #1948 (comment) |
Signed-off-by: Sobolev, Dmitriy [email protected]
Some devices do not support shared allocations, e.g. some FPGA cards/configurations. Using not supported allocation will result in getting nullptr and then accessing it.
2021.1.2 compiler throws "sycl::runtime_error" and returns "This device aspect has not been implemented yet".
The patch which adds support of USM aspects: intel/llvm@ce3ac09