[Clang][SYCL] Fix bundler target triple for SPIR-V in old offload model#22429
Merged
wenju-he merged 4 commits intoJun 25, 2026
Conversation
Upstream f8cb6be ("clang: Use the effective triple string for offload jobs") added FOUR_IDENT normalization in OffloadBundler::ConstructJob, causing SYCL SPIR-V device triples to be emitted in 4-component form (spir64-unknown-unknown-unknown) instead of the 3-component form (spir64-unknown-unknown) expected by the old offload model bundler. Skip FOUR_IDENT normalization for SYCL+SPIR/SPIRV targets in bundling jobs to preserve the 3-component triple format. Fixes - Driver/clang-offload-bundler-bc-archive-support-linux-old-model.cpp - Driver/sycl-no-rdc-fat-archive-old-model.cpp - Driver/sycl-offload-old-model.cpp - Driver/sycl-oneapi-gpu-intelgpu.cpp Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extend the FOUR_IDENT normalization skip (added in ffb3b45) to also cover SYCL NVPTX targets. Upstream f8cb6be caused bundling to emit nvptx64-nvidia-cuda-unknown (4-component) while unbundling still uses nvptx64-nvidia-cuda (3-component), breaking fat object round-trips. Fixes Driver/sycl-oneapi-gpu-nvidia.cpp NVIDIA_FATO/NVIDIA_CONSUME_FAT. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Filed issue #22443 as a follow-up to switch to 4-component triple. |
wenju-he
added a commit
that referenced
this pull request
Jun 26, 2026
…el (#22429) Upstream f8cb6be ("clang: Use the effective triple string for offload jobs") added FOUR_IDENT normalization in OffloadBundler::ConstructJob, causing SYCL SPIR-V device triples to be emitted in 4-component form (spir64-unknown-unknown-unknown) instead of the 3-component form (spir64-unknown-unknown) expected by the old offload model bundler. Skip FOUR_IDENT normalization for SYCL+SPIR/SPIRV targets in bundling jobs to preserve the 3-component triple format. Fixes - Driver/clang-offload-bundler-bc-archive-support-linux-old-model.cpp - Driver/sycl-no-rdc-fat-archive-old-model.cpp - Driver/sycl-offload-old-model.cpp - Driver/sycl-oneapi-gpu-intelgpu.cpp - Driver/sycl-oneapi-gpu-nvidia.cpp Changing to 4-component triples could be done later together with https://github.com/intel/llvm/blob/5bec703f62da/clang/lib/Driver/ToolChains/Clang.cpp#L10369 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Upstream f8cb6be ("clang: Use the effective triple string for offload jobs") added FOUR_IDENT normalization in OffloadBundler::ConstructJob, causing SYCL SPIR-V device triples to be emitted in 4-component form (spir64-unknown-unknown-unknown) instead of the 3-component form (spir64-unknown-unknown) expected by the old offload model bundler.
Skip FOUR_IDENT normalization for SYCL+SPIR/SPIRV targets in bundling jobs to preserve the 3-component triple format.
Fixes
Changing to 4-component triples could be done later together with
llvm/clang/lib/Driver/ToolChains/Clang.cpp
Line 10369 in 5bec703