Repository navigation
Conversation
Since intel#22365, -fsycl-host-only objects (old offload model) carry no device bundle or .tgtsym section. When the host objects and the -fsycl-device-only code ship in separate static archives, the device link no longer sees the kernels used by the host objects, and llvm-link --only-needed drops them without a diagnostic. For host-only compilations that create an object, compile the device side to IR and bundle it with the new clang-offload-bundler option -target-symbols-only. This adds the .tgtsym section without embedding any device code, so the object stays host-only while the device link can still find the device code it needs. -S, -fsyntax-only, -emit-llvm and -flto keep the syntax-only device compilation. This fix is for the old offloading model only - a separate fix will be needed to address this issue in the new model.
Contributor
|
"-fsycl-device-only code ship" Doesn't -fsycl-device-only exist only for debugging by compiler developers? I don't think the compiler behavior for this option is well defined. |
Contributor
Author
There is nothing restricting the usage of |
This branch has not been deployed
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.
Since #22365, -fsycl-host-only objects (old offload model) carry no device bundle or .tgtsym section. When the host objects and the -fsycl-device-only code ship in separate static archives, the device link no longer sees the kernels used by the host objects, and llvm-link --only-needed drops them without a diagnostic.
For host-only compilations that create an object, compile the device side to IR and bundle it with the new clang-offload-bundler option -target-symbols-only. This adds the .tgtsym section without embedding any device code, so the object stays host-only while the device link can still find the device code it needs. -S, -fsyntax-only, -emit-llvm and -flto keep the syntax-only device compilation.
This fix is for the old offloading model only - a separate fix will be needed to address this issue in the new model.