-
Notifications
You must be signed in to change notification settings - Fork 790
[SYCL][CodeGen] Directly disable OCL kernel stub for SYCL (NFC) #19213
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
steffenlarsen
merged 8 commits into
intel:sycl
from
Maetveis:disable-kernel-stub-directly
Jul 2, 2025
Merged
[SYCL][CodeGen] Directly disable OCL kernel stub for SYCL (NFC) #19213
steffenlarsen
merged 8 commits into
intel:sycl
from
Maetveis:disable-kernel-stub-directly
Jul 2, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The way 1ce3803 and bdd5232 disabled the kernel stub for SYCL is weird, returning from `TargetCodeGenInfo::setOCLKernelStubCallingConvention()` in SYCL mode. Basically we were actually emitting code for the stub would but we customized it to not change its calling convention. Instead, add `getLangOpts().OpenCL` checks to `CodeGenFunction::GenerateCode` (to emit the kernel contents directly into the kernel) and to `CodeGenModule::EmitGlobal` (to disable the deferred emission of the stub). With this change, we should never come across `KernelReferenceKind::Stub` in SYCL mode.
This reverts commit 1ce3803.
This reverts commit 2d3018c.
Maetveis
commented
Jun 30, 2025
bader
reviewed
Jun 30, 2025
Fznamznon
approved these changes
Jun 30, 2025
frasercrmck
approved these changes
Jul 1, 2025
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.
Thanks for cleaning this up
The windows pre-commit failure (https://github.com/intel/llvm/actions/runs/15995441333/job/45123897731?pr=19213) is due to #18576 |
This should be ready to merge @intel/llvm-gatekeepers, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The way 1ce3803 ([SYCL] Disable kernel stub for now (#28629)) and 3b170e3 ([SYCL][AMD] Fix kernel stub calling convention for AMD) disabled the OpenCL kernel stub for SYCL is weird, returning from
TargetCodeGenInfo::setOCLKernelStubCallingConvention()
in SYCL mode.Basically we were actually emitting code for the stub would but we customized it to not change its calling convention.
Instead, add
getLangOpts().OpenCL
checks toCodeGenFunction::GenerateCode
(to emit the kernel contents directly into the kernel) and to
CodeGenModule::EmitGlobal
(to disable the deferred emission of the stub).With this change, we should never come across
KernelReferenceKind::Stub
in SYCL mode.