-
Notifications
You must be signed in to change notification settings - Fork 116
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
[DeviceSanitizer] Memory overhead statistics #1869
Conversation
It occurs to me that this only measures the redzone overhead, I think we should also mean the total overhead including shadow memory and other usages. Maybe we can implement a thin layer that keeps track of all memory allocation and compares the data with and without the sanitizer layer. That way we can have the overall memory overhead data instead of only the redzone overhead. |
No, actually it includes shadow memory. |
Hi @pbalcer @kswiecicki, please review. Thanks! |
Hi @pbalcer, I think the failed CIs are unrelated, could you please double check this? Thanks! |
@AllanZyne they are indeed. I'll mark it ready to merge after you get approval from @yingcong-wu. |
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.
Just a idea and a nit, can we create a warpper to check PrintStats
, and avoid (as much as we can) the overhead of this statistics when we not enable the tracking?
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.
Good idea. Done.
I resolved a conflict and rebased the PR. ... but it didn't work :-) please rebase and update the PR. Thanks. |
No problem. Done. |
looking to merge this soon, are @zhaomaosu and @kswiecicki still required reviewers? |
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
Kindly ping @kswiecicki |
UR: oneapi-src/unified-runtime#1869 Statistic memory overhead (usm redzone + shadow memory) on each context, enabled by exporting asan flag UR_LAYER_ASAN_OPTIONS=print_stats:1. --------- Co-authored-by: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
LLVM: intel/llvm#14592
Statistic memory overhead (usm redzone + shadow memory) on each context, enabled by exporting asan flag
UR_LAYER_ASAN_OPTIONS=print_stats:1
.Addtionally, move "AsanOptions" under "SanitizerInterceptor".