[llvm] [offload][SYCL] Add SYCL Module splitting. (PR #131347)
Maksim Sabianin via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 18 06:10:31 PDT 2025
maksimsab wrote:
High-level RFCs are available on Discourse:
* https://discourse.llvm.org/t/rfc-add-full-support-for-the-sycl-programming-model/74080
* https://discourse.llvm.org/t/rfc-offloading-design-for-sycl-offload-kind-and-spir-targets/74088
* https://discourse.llvm.org/t/rfc-sycl-driver-enhancements/74092
> So this SYCL mode can, e.g. use either the SPIRV or AMDGPU target at the same time?
Yes, a user chooses a target like:
```
clang++ -fsycl -fsycl-targets=nvidia_gpu_sm_90 code.cpp
or
clang++ -fsycl -fsycl-targets=amd_gpu_gfx1201 code.cpp
```
The list of supported targets in downstream can be observed here: https://intel.github.io/llvm/UsersManual.html#generic-options
There is no such thing as a SYCL Target since we are actually targeting Intel CPU/GPU, AMDGPU, and NVPTX. It is similar to OpenCL and OpenMP.
I would also like to have a specific folder like llvm/Target/SYCL, but that doesn't really seem appropriate.
> How does it work ? Does it use a different target triple, or is it a LLVM flag that changes the compilation pipeline? Is there a high-level overview somewhere of how this works in LLVM? What attributes would a module using SYCL have and what target triple would it use?
There is some information in the mentioned RFC [Offloading design for SYCL offload kind and SPIR targets](https://discourse.llvm.org/t/rfc-offloading-design-for-sycl-offload-kind-and-spir-targets/74088). We are going to incorporate module splitting in the clang-linker-wrapper, which will be able to recognize incoming SYCL inputs. So a compilation pipeline is going to be constructed and executed in clang-linker-wrapper. We are also preparing more detailed documentation about SYCL offloading right now, which we will add to the llvm-project.
https://github.com/llvm/llvm-project/pull/131347
More information about the llvm-commits
mailing list