Repository navigation
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.
[SYCL][libc] Enable spirv64 libc for SYCL device code #23622
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
base: sycl
Are you sure you want to change the base?
[SYCL][libc] Enable spirv64 libc for SYCL device code #23622
Changes from all commits
445d066d15467dd55ece98091b7eaf2719adf70a80f377524a0d102f7c2ae55f3f92925e2379cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
IIUC, this lets spir64 triples find libraries installed under spirv64-unknown-unknown dir.
Correct?
Since it's in the base ToolChain, it affects every lookup that uses this (getRuntimePath, getStdlibPath, getStdlibIncludePath), not just SYCL libc.
A few cases:
questions:
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.
With the new offload model, a missing libc.bc is now a hard error, so any toolchain built without spirv64 libc can't compile SYCL code anymore.
The old model just skips it silently (Driver.cpp only links the lib if the file exists).
Is that intended?
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.
nit: same here, please anchor to the spirv64 dir.
Also, in sycl-no-rdc-win.cpp, "{{.}}libc{{.}}" matches libclang_rt.builtins.bc too.
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.
All the test changes here only update CHECK lines.
Can you add tests for:
-fno-offloadlib --> libc.bc is not linked
libc.bc missing --> cannot find expected SYCL device library 'libc.bc' with the new offload model
-fsycl-targets=spir64_gen and spir64_x86_64 --> picks up spirv64-unknown-unknown/libc.bc
An E2E test that calls memcpy/strcmp in a kernel would also be good.
nit: maybe anchor this to spirv64-unknown-unknown{{/|\\}}libc.bc
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.