-
Notifications
You must be signed in to change notification settings - Fork 789
[sycl-post-link] Support indirectly called assert #4027
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
Conversation
Per design doc (https://github.com/intel/llvm/blob/sycl/sycl/doc/Assert.md): If a callgraph for indirect callable function (marked with specific attribute) has a call to __devicelib_assert_fail, then all kernels in the module are conservatively marked as using asserts.
@@ -547,15 +555,36 @@ static string_vector saveDeviceImageProperty( | |||
|
|||
{ | |||
Module *M = ResultModules[I].get(); | |||
bool HasIndirectlyCalledAssert = false; | |||
std::vector<llvm::Function *> Kernels; | |||
for (auto &F : M->functions()) { | |||
// TODO: handle SYCL_EXTERNAL functions for dynamic linkage. | |||
// TODO: handle function pointers. |
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 TODO can be now removed
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.
Not sure that it's right to remove it - we haven't implemented this yet.
@mlychkov could you please review the change? thanks! |
Co-authored-by: Mikhail Lychkov <[email protected]>
Per design doc (https://github.com/intel/llvm/blob/sycl/sycl/doc/Assert.md):
If a callgraph for indirect callable function (marked with specific attribute)
has a call to __devicelib_assert_fail, then all kernels in the module are
conservatively marked as using asserts.