Skip to content

[SYCL][CUDA] Update code when llvm.used is removed #4409

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 5 commits into from
Sep 2, 2021

Conversation

AidanBeltonS
Copy link
Contributor

@AidanBeltonS AidanBeltonS commented Aug 26, 2021

When using sycl-post-link llvm.used should be removed. Otherwise it can cause a crash further on.
This patch checks to see if llvm.used is removed and if it is prevents the old code from being reused in the table.

This fixes #4294.
See issue for more details on problem.

@AidanBeltonS AidanBeltonS changed the title [SYCL][CUDA] Updates [SYCL][CUDA] Update code when llvm.used is removed Aug 26, 2021
mlychkov
mlychkov previously approved these changes Aug 30, 2021
Copy link
Contributor

@mlychkov mlychkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mlychkov
Copy link
Contributor

@AidanBeltonS Could you please add a test for this fix?

@AidanBeltonS
Copy link
Contributor Author

AidanBeltonS commented Aug 30, 2021

@AidanBeltonS Could you please add a test for this fix?

Yes, ill work on adding one to test the desired behaviour.

@kbobrovs kbobrovs requested a review from sndmitriev August 31, 2021 13:25
@bader bader requested a review from mlychkov September 1, 2021 09:26
Co-authored-by: Mikhail Lychkov <51128024+mlychkov@users.noreply.github.com>
@bader bader requested a review from mlychkov September 1, 2021 12:53
@bader bader merged commit a6076d0 into intel:sycl Sep 2, 2021
AlexeySachkov added a commit to AlexeySachkov/llvm that referenced this pull request Nov 10, 2021
If declaration is treated as entry point, then we will create a
device image which claims that it contains particular kernel,
while it actually doesn't - that leads to errors at runtime.

Kernel declarations can appear in input modules as a side
effect of intel#4409. The PR postponed removal of
`@llvm.used` variable from input modules, which results
in kernel declarations left in modules after split between
SYCL and ESIMD kernels.
dm-vodopyanov pushed a commit that referenced this pull request Nov 12, 2021
If declaration is treated as entry point, then we will create a
device image which claims that it contains particular kernel,
while it actually doesn't - that leads to errors at runtime.

Kernel declarations can appear in input modules as a side
effect of #4409. The PR postponed removal of
`@llvm.used` variable from input modules, which results
in kernel declarations left in modules after split between
SYCL and ESIMD kernels.
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.

Clang crashes since last pulldowns when building shared objects
4 participants