-
Notifications
You must be signed in to change notification settings - Fork 797
[SYCL] Free function host compilation bugfix #19541
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
sarnex
merged 19 commits into
intel:sycl
from
lbushi25:free_function_host_compilation_bugfix
Aug 1, 2025
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
34a11ca
Provide supports for decomposable structs
lbushi25 edec2b4
Merge branch 'sycl' of https://github.com/lbushi25/llvm into sycl
lbushi25 c9680a2
Revert "Provide supports for decomposable structs"
lbushi25 b932fe6
Merge branch 'sycl' of https://github.com/lbushi25/llvm into sycl
lbushi25 6b6da56
Merge branch 'sycl' of https://github.com/lbushi25/llvm into sycl
lbushi25 ceaabfd
Merge branch 'sycl' of https://github.com/lbushi25/llvm into sycl
lbushi25 714839e
Merge branch 'sycl' of https://github.com/lbushi25/llvm into sycl
lbushi25 e7adeb3
Add sanity test
lbushi25 b453f78
Bugfix
lbushi25 68679af
Update free_function_int_header_rtc_mode.cpp
lbushi25 73c7651
Move test to sycl/test and fix precommit failures
lbushi25 e9ddfea
Fix conflict
lbushi25 2c2ff65
Update free_function_host_compiler.cpp
lbushi25 80a475b
Update free_function_host_compiler.cpp
lbushi25 41daa24
Fix pre-commit failures
lbushi25 0d6ea81
Merge branch 'free_function_host_compilation_bugfix' of https://githu…
lbushi25 90c9541
Improve tests by adding cases with unnamed lambda extension disabled
lbushi25 9f904f6
Improve tests by adding cases with unnamed lambda extension disabled
lbushi25 3adcd2a
Update sycl/test/extensions/free_function_kernels/free_function_host_…
lbushi25 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
32 changes: 32 additions & 0 deletions
32
sycl/test/extensions/free_function_kernels/free_function_host_compiler.cpp
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// RUN: %clangxx -fsycl %s | ||
// RUN: %clangxx -fsycl -fno-sycl-unnamed-lambda %s | ||
// RUN: %clangxx -fsycl -fsycl-host-compiler=g++ %s | ||
// REQUIRES: linux | ||
|
||
// This test serves as a sanity check that compilation succeeds | ||
// for a simple free function kernel when using the host compiler | ||
// flag with unnamed lambda extension enabled(default) and disabled. | ||
|
||
#include <sycl/detail/core.hpp> | ||
#include <sycl/ext/oneapi/experimental/free_function_traits.hpp> | ||
#include <sycl/kernel_bundle.hpp> | ||
|
||
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY( | ||
(sycl::ext::oneapi::experimental::nd_range_kernel<1>)) | ||
void kernel() {} | ||
|
||
int main() { | ||
sycl::queue q; | ||
|
||
sycl::kernel_bundle bundle = | ||
sycl::get_kernel_bundle<sycl::bundle_state::executable>(q.get_context()); | ||
sycl::kernel_id kID = | ||
sycl::ext::oneapi::experimental::get_kernel_id<kernel>(); | ||
sycl::kernel krn = bundle.get_kernel(kID); | ||
|
||
q.submit([&](sycl::handler &cgh) { | ||
sycl::nd_range<1> ndr; | ||
cgh.parallel_for(ndr, krn); | ||
}); | ||
return 0; | ||
} |
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.
Uh oh!
There was an error while loading. Please reload this page.