-
Notifications
You must be signed in to change notification settings - Fork 796
[DeviceSanitizer] Memory overhead statistics #14592
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
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a15a76d
change ur repo
AllanZyne 4fa308e
add tests
AllanZyne 8a19587
Merge branch 'sycl' into review/yang/statistics
AllanZyne 7bde562
fix test
AllanZyne 574c210
Merge branch 'sycl' into review/yang/statistics
AllanZyne 82d86bf
Update sycl/test-e2e/AddressSanitizer/common/statistics.cpp
AllanZyne 4dc75cc
Update sycl/test-e2e/AddressSanitizer/common/statistics.cpp
AllanZyne f8128cc
Merge branch 'sycl' into review/yang/statistics
AllanZyne 034c1c8
Merge branch 'sycl' into review/yang/statistics
AllanZyne bd63b46
Merge remote-tracking branch 'origin/sycl' into review/yang/statistics
kbenzie a435f20
Merge remote-tracking branch 'origin/sycl' into review/yang/statistics
kbenzie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // REQUIRES: linux | ||
| // RUN: %{build} %device_asan_flags -O2 -g -o %t | ||
| // RUN: %{run} %t 2>&1 | FileCheck %s | ||
| // RUN: env UR_LAYER_ASAN_OPTIONS=print_stats:1 %{run} %t 2>&1 | FileCheck --check-prefixes CHECK-STATS %s | ||
| #include <sycl/usm.hpp> | ||
|
|
||
| /// This test is used to check enabling/disabling memory overhead statistics | ||
| /// We always use "Stats" prefix in statistics message like asan | ||
|
|
||
| constexpr std::size_t N = 4; | ||
| constexpr std::size_t group_size = 1; | ||
|
|
||
| int main() { | ||
| sycl::queue Q; | ||
| int *array = sycl::malloc_device<int>(1024 * 1024, Q); | ||
|
|
||
| Q.submit([&](sycl::handler &cgh) { | ||
| auto acc = sycl::local_accessor<int>(group_size, cgh); | ||
| cgh.parallel_for<class MyKernel>( | ||
| sycl::nd_range<1>(N, group_size), [=](sycl::nd_item<1> item) { | ||
| array[item.get_global_id()] = acc[item.get_local_id()]; | ||
| }); | ||
| }); | ||
| Q.wait(); | ||
| // CHECK-STATS: Stats | ||
| // CHECK-NOT: Stats | ||
|
|
||
| sycl::free(array, Q); | ||
| std::cout << "PASS" << std::endl; | ||
| return 0; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.