-
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] Support "-fsanitize-ignorelist=" to disable sanitizing on some of kernels #2055
[DeviceSanitizer] Support "-fsanitize-ignorelist=" to disable sanitizing on some of kernels #2055
Conversation
please rebase |
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
if (m_KernelMap.find(Kernel) != m_KernelMap.end()) { | ||
return m_KernelMap[Kernel]; | ||
} | ||
return nullptr; |
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.
Please add assertions for all caller of getKernelInfo to avoid segment fault. I see there are some guard with assertion, but some are not.
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.
Actually, I think this is better than old implement(return nullptr when not found), then there will be a segv that we will not miss. But adding assertion after a call that may return nullptr is better.
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.
It needn't assert, I did this on purpose.
It possible that some of kernel are not in m_KernelMap
.
I have added "if" checkers when calling getKernelInfo
.
You're right, I will add.
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.
KernelInfo doesn't like other XXXinfo.
It's possible that some of kernel are not in m_KernelMap.
@@ -111,9 +111,9 @@ struct ProgramInfo { | |||
ur_program_handle_t Handle; | |||
std::atomic<int32_t> RefCount = 1; | |||
|
|||
// lock this mutex if following fields are accessed |
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.
If the program is only built once, then this would not be a problem to use mutex. I don't like the "likely" in the comment unless it has proves. I prefer keeping the mutex.
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.
Synced with @zhaomaosu, mutex can be removed here.
I removed "likely" in comment.
Hi @oneapi-src/unified-runtime-maintain, please review, thank you. |
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, just remove the unnecessary loop.
LLVM: intel/llvm#15294
Add a device global "__AsanKernelMetadata" which records the sanitized kernel name, so that we can check if sanitizer layer needs specially handle it.