Skip to content

[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

Merged
merged 6 commits into from
Jul 8, 2021

Conversation

vmaksimo
Copy link
Contributor

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.

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.
Copy link
Contributor

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

Copy link
Contributor Author

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.

@vmaksimo
Copy link
Contributor Author

vmaksimo commented Jul 7, 2021

@mlychkov could you please review the change? thanks!

mlychkov
mlychkov previously approved these changes Jul 7, 2021
@bader bader requested a review from mlychkov July 8, 2021 16:42
@bader bader merged commit f09832c into intel:sycl Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants