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

Check for support of specific type of USM in tests #420

Closed
wants to merge 7 commits into from

Conversation

dmitriy-sobolev
Copy link
Contributor

@dmitriy-sobolev dmitriy-sobolev commented Nov 16, 2021

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.

  • To verify with the 2021.1 version of DPC++ compiler in order not to break backward compatibility of the tests.
    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

@dmitriy-sobolev
Copy link
Contributor Author

@SergeyKopienko, could you review this patch?

@SergeyKopienko
Copy link
Contributor

SergeyKopienko commented Dec 15, 2021

@dmitriy-sobolev, please rebase from main this branch.

Copy link
Contributor

@SergeyKopienko SergeyKopienko left a 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;
Copy link
Contributor

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.

Copy link
Contributor Author

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))
Copy link
Contributor

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.

Copy link
Contributor Author

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)

test/support/utils_sycl.h Outdated Show resolved Hide resolved
test/support/utils_sycl.h Show resolved Hide resolved
test/support/utils_sycl.h Show resolved Hide resolved
test/support/utils_sycl.h Show resolved Hide resolved
@dmitriy-sobolev dmitriy-sobolev force-pushed the dev/dmitriy-sobolev/check-usm-support branch from e681327 to a03ba23 Compare December 15, 2021 12:04
* Rebase

* Add const to sycl::exception and log it

* Map sycl::usm::alloc to usm sycl::aspect

Signed-off-by: Sobolev, Dmitriy <[email protected]>
@dmitriy-sobolev dmitriy-sobolev force-pushed the dev/dmitriy-sobolev/check-usm-support branch from a03ba23 to af3d153 Compare December 15, 2021 12:15
dmitriy-sobolev and others added 4 commits December 15, 2021 15:43
Signed-off-by: Sobolev, Dmitriy <[email protected]>
* Apply fixes required after rebasing

Signed-off-by: Sobolev, Dmitriy <[email protected]>
Remove extra line
@dmitriy-sobolev
Copy link
Contributor Author

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)

@dmitriy-sobolev dmitriy-sobolev deleted the dev/dmitriy-sobolev/check-usm-support branch November 22, 2024 11:38
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.

2 participants