[clang] [llvm] [Clang][SYCL] Compile device code once per IGCA target (PR #239010)
Yury Plyakhin via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 12 18:10:31 PST 2026
================
@@ -82,6 +82,11 @@ other. Generally, this requires that the target triple and architecture match.
An exception is made when the architecture is listed as `generic`, which will
cause it be linked with any other device code with the same target triple.
+SYCL device code for an IGCA target can also list the Intel GPUs to compile it
+ahead of time for, as `code=xe-mtl-h,xe-mtl-u`. It is only linked with device
+code that lists the same GPUs, and the GPUs are passed on to
+`clang-sycl-linker`.
+
----------------
YuriPlyakhin wrote:
Grouping by `code` is independent of the offload kind, so it should not be documented as SYCL-specific. I'd suggest documenting it like this:
1. Change one sentence in the paragraph above:
```
Generally, this requires that the target triple, the architecture and
the optional `code` list match.
```
2. Add a paragraph:
```
The `code` list is only needed when the architecture is a virtual one that
several devices share, and it names the real devices to compile the device code
for ahead of time.
```
I'd prefer to avoid providing SYCL specifics like using `clang-sycl-linker` in documentation for `clang-linker-wrapper`, which is a generic tool covering all offload producers.
https://github.com/llvm/llvm-project/pull/239010
More information about the cfe-commits
mailing list