Skip to content

[DeviceSanitizer] Add e2e tests for detecting out-of-bounds errors on sycl::buffer #13504

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

Merged
merged 15 commits into from
May 31, 2024

Conversation

zhaomaosu
Copy link
Contributor

@zhaomaosu zhaomaosu commented Apr 22, 2024

@zhaomaosu zhaomaosu marked this pull request as ready for review May 22, 2024 01:18
@zhaomaosu zhaomaosu requested review from a team as code owners May 22, 2024 01:18
@@ -0,0 +1,34 @@
// REQUIRES: linux, cpu
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 merging all these tests into a single .cpp file might be beneficial for CI load, but we can address it separately for the entire E2E suite at once.

Comment on lines 27 to 30
item.get_global_id(0) * item.get_global_range(1) *
item.get_global_range(2) +
item.get_global_id(1) * item.get_global_range(2) +
item.get_global_id(2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be simplified using nd_item::get_global_linear_id().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


q.submit([&](sycl::handler &h) {
auto A = buf.get_access<sycl::access::mode::write>(h);
h.copy(&v[0], A);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the same for fill/memset?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated. BTW, the case just wants to test that buffer copy/fill will not crash since in UR side we intercept all buffer related APIs with USM.

Copy link
Contributor

@wenju-he wenju-he left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kbenzie kbenzie temporarily deployed to WindowsCILock May 31, 2024 09:32 — with GitHub Actions Inactive
@kbenzie kbenzie temporarily deployed to WindowsCILock May 31, 2024 09:57 — with GitHub Actions Inactive
@kbenzie
Copy link
Contributor

kbenzie commented May 31, 2024

@intel/llvm-gatekeepers please merge

@sarnex sarnex merged commit 69a37c2 into intel:sycl May 31, 2024
13 checks passed
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.

6 participants