-
Notifications
You must be signed in to change notification settings - Fork 124
[DeviceMSAN] Support MemorySanitizer for device offloading #2325
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
[DeviceMSAN] Support MemorySanitizer for device offloading #2325
Conversation
source/loader/layers/sanitizer/sanitizer_common/sanitizer_shadow.hpp
Outdated
Show resolved
Hide resolved
source/loader/layers/sanitizer/sanitizer_common/sanitizer_shadow.hpp
Outdated
Show resolved
Hide resolved
zhaomaosu
left a comment
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
|
Hi @oneapi-src/unified-runtime-maintain, internal review has done. Please review, thank you. |
|
CI "Build and test / E2E OpenCL / Start e2e job / Build SYCL, UR, run E2E" failed is due to opencl driver haven't upgraded to 2025.0. |
|
ping @oneapi-src/unified-runtime-maintain |
intel/llvm#15955 is Waiting on code owner review from intel/dpcpp-clang-driver-reviewers, intel/dpcpp-esimd-reviewers, intel/dpcpp-tools-reviewers, intel/llvm-reviewers-runtime until those code owners approve that PR this won't be merged. |
|
Hi @oneapi-src/unified-runtime-maintain @pbalcer, I have got almost all reviewers' approve from llvm, could you please review this PR as well? |
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.
Mostly lgtm. My biggest concern is the large amounts of copy/pasting that the new msan is doing from the existing asan codebase. I understand the urgency for now, so we can move with the current implementation, but please consider how you could reduce the number of duplications in your codebase this is creating so that asan/msan are easier to maintain long-term.
| return UR_RESULT_SUCCESS; | ||
| } | ||
|
|
||
| ur_result_t MsanInterceptor::registerSpirKernels(ur_program_handle_t Program) { |
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.
This, and a few other functions in this file, are nearly straight copy-paste from asan interceptor.
I know there's time pressure now, but please create a high-priority ticket to refactor this post merge. Maybe there should be a common base class for sanitizers that contains the shared code?
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.
Sure, we noticed this problem as well, after intense period of feature developing, we will try to merge common codes to make it more easily maintain.
| namespace ur_sanitizer_layer { | ||
| namespace msan { | ||
|
|
||
| MsanOptions::MsanOptions() { |
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.
This is a near 1:1 copy/paste from asan_options.
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.
We consider to use a single sanitizer option in the future
Thank you for your understanding, @pbalcer! |
|
Once the L0 jobs complete I'll squash the commits then merge this. |
|
After merging #2420 (since the CI was ready) there is a conflict on |
Hi @kbenzie, I have to merge main branch to solve the conflict, which is not the commit id pointed by LLVM. |
a064875 to
064da15
Compare
UR: oneapi-src/unified-runtime#2325 --------- Co-authored-by: Zhao, Maosu <[email protected]> Co-authored-by: Kenneth Benzie (Benie) <[email protected]>
UR: oneapi-src/unified-runtime#2325 --------- Co-authored-by: Zhao, Maosu <[email protected]> Co-authored-by: Kenneth Benzie (Benie) <[email protected]>
LLVM: intel/llvm#15955