-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL RTC] Use in-memory libcxx/libc headers for SPIR-V targets #20502
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 RTC] Use in-memory libcxx/libc headers for SPIR-V targets #20502
Conversation
f54abd9 to
c9bdf63
Compare
c9bdf63 to
350e8f2
Compare
350e8f2 to
5c6f8b1
Compare
5c6f8b1 to
9d0562d
Compare
9d0562d to
2299dcb
Compare
2299dcb to
9032697
Compare
9032697 to
846f1c3
Compare
846f1c3 to
99376a1
Compare
99376a1 to
5506074
Compare
| - type: size_t | ||
| - type: size_t | ||
| - type: mbstate_t | ||
| - type: mbstate_t *__restrict |
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.
This and the one below are part of the upstream llvm/llvm-project#164666.
5506074 to
6fffeb8
Compare
sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc
Outdated
Show resolved
Hide resolved
gmlueck
left a comment
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.
Looks good!
|
@intel/llvm-reviewers-runtime, Chris is on vacation, can somebody else take a look? |
While resulting in extra restrictions to ensure not ABI-violations when
passing data between host and device, that makes distribution of SYCL
applications using SYCL RTC much easier, so we're willing to pay that
price. Kernel compiler extension is being updated accordingly.
Ideally, we'd like to use the same STL implementation as the host code,
but we cannot re-distribute GNU libstdc++/libc or MS C++/C
headers (including Windows SDK) due to legal restrictions, so we embed
LLVM's libcxx/libc headers instead.
The way SYCL (non-RTC) works is that we use the same host C++/C
headers for device compilation and ignore the actual
libc.so/libstdc++.so as we provide known entry points ourselves (be it
libclc/libdevice/etc.). As such, for SYCL RTC, we don't actually need to
build those runtimes for a gpu target either, and can just use the
headers they provide. However, libc implementation of
entrypoints/headers on Windows is very incomplete, but we don't really
need that. All we need is declarations of C Standard Library/POSIX
functions and there is a way to pass some extra defines/configs to make
it generate that. As such, we avoid
LLVM_ENABLE_RUNTIMESand insteadconfigure libcxx/libc as extra projects manually, passing needed option
and avoid full builds and installation for the regular host toolchain.o
Another caveat is that we have to disable system include paths (to
exclude regular libc headers as having two libc implementations is
causing all sorts of issues). As such, this approach isn't working for
CUDA/HIP targets that need corresponding SDKs. Previous behavior of
requiring/using system C++ toolchain is retained for those targets.