You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SYCL] clang-offload-bundler returns the first architecture's device code for every intel_gpu_* target #23487
With several Intel GPU (or NVIDIA) SYCL targets and separate compile and link in the old offloading model, every architecture gets the device code of the first one.
foo.o stores the device code of each GPU under its own bundle ID, sycl-spir64_gen-unknown-unknown-tgllp and sycl-spir64_gen-unknown-unknown-pvc. When the link step extracts the PVC entry, clang-offload-bundler returns the TGLLP entry instead:
With -fno-sycl-rdc, running on PVC then fails with:
Kernel ... has no image for the selected device. Its available images target: [intel_gpu_tgllp, intel_gpu_tgllp].
Cause
The bundler expects the architecture in the 6th part of the bundle ID (<kind>-<arch>-<vendor>-<os>-<env>-<target id>), but SYCL bundle IDs only have 5 parts, so tgllp/pvc is parsed as the triple environment and the target ID is empty. All the entries then compare as equal, and the first one is returned:
Activity