-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][Driver][libdevice] Link libspirv in -fsycl-device-only
mode
#19136
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
Draft
Maetveis
wants to merge
1
commit into
review/Maetveis/libspirv-unused-argument
Choose a base branch
from
review/Maetveis/link_libsycl_device_only
base: review/Maetveis/libspirv-unused-argument
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[SYCL][Driver][libdevice] Link libspirv in -fsycl-device-only
mode
#19136
Maetveis
wants to merge
1
commit into
review/Maetveis/libspirv-unused-argument
from
review/Maetveis/link_libsycl_device_only
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
This was referenced Jun 25, 2025
eb713e6
to
8badf3c
Compare
bca7c8e
to
2e71452
Compare
8badf3c
to
db2c9d8
Compare
2e71452
to
3dc3b8d
Compare
db2c9d8
to
eac8168
Compare
steffenlarsen
pushed a commit
that referenced
this pull request
Jun 27, 2025
) <!-- start git-machete generated --> # Based on PR #18956 ## Tree of downstream PRs as of 2025-06-25 * **PR #19130 (THIS ONE)** * PR #19131 * PR #19134 * PR #19135 * PR #19136 <!-- end git-machete generated --> In the next commits I'd like to refactor and fix SYCL libspirv linking. This adds a few tests to cover the current behavior. Some of it is buggy, and not consistent between NVPTX and AMDGPU, it will be improved in the next commits.
11e238c
to
d5440ef
Compare
3dc3b8d
to
bfe4aa4
Compare
d5440ef
to
e5c3890
Compare
bfe4aa4
to
955affd
Compare
bader
pushed a commit
that referenced
this pull request
Jun 27, 2025
<!-- start git-machete generated --> # Based on PR #19130 ## Chain of upstream PRs & tree of downstream PRs as of 2025-06-25 * PR #19130 * **PR #19131 (THIS ONE)** * PR #19134 * PR #19135 * PR #19136 <!-- end git-machete generated --> Move the logic for finding and linking libspirv into SYCLInstallationDetector. This code was basically duplicated between the CUDA and HIP toolchains, and was also present in the Driver sources. This is NFC, aside from the fact that the code in the HIP toolchain lacked the special handling for the `-###` driver option present in the other two places.
Previously, the `-fsycl-device-only` mode disabled linking libspirv. `-fsycl-device-only` should produce the same LLVM-IR as `-fsycl` would, but without any host actions. Libdevice is the likely reason why this was done as is, but it should not be the default. This patch changes libdevice options to disable libspirv linking there, and enables linking by default in `-fsycl-device-only` mode.
e5c3890
to
0bb5db5
Compare
955affd
to
e405eb0
Compare
bader
pushed a commit
that referenced
this pull request
Jul 1, 2025
<!-- start git-machete generated --> # Based on PR #19131 ## Chain of upstream PRs & tree of downstream PRs as of 2025-06-25 * PR #19130 * PR #19131 * **PR #19134 (THIS ONE)** * PR #19135 * PR #19136 <!-- end git-machete generated --> ... instead of the resource directory. This matches the behaviour of SYCL device libraries. The resource directory has nothing to do with libspirv, and it might be changed by the `-resource-dir` option, which would lead us to not find it.
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.
Based on PR #19135
Chain of upstream PRs as of 2025-06-25
PR [SYCL][Driver] Improve SYCL libspirv linking test coverage (NFC) #19130
PR [SYCL][Driver] Deduplicate libspirv logic #19131
PR [SYCL][Driver] Base libspirv path on sycl install candidates #19134
PR [SYCL][Driver] Emit unused argument warning for -fno-libspirv #19135
-fsycl-device-only
mode #19136 (THIS ONE)Previously, the
-fsycl-device-only
mode disabled linking libspirv.-fsycl-device-only
should produce the same LLVM-IR as-fsycl
would,but without any host actions.
Libdevice is the likely reason why this was done as is, but it should
not be the default. This patch changes libdevice options to disable
libspirv linking there, and enables linking by default in
-fsycl-device-only
mode.