-
Notifications
You must be signed in to change notification settings - Fork 790
[clang-linker-wrapper] Dump any device code format #17546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Dispate of the option name sycl-dump-device-code it enables dumping of SPIR-V files emitted by the translator tool. This change dumps device code right before embedding it into the fat object. The tool dumps offloading image of any format.
@maksimsab, ping. |
@maksimsab, ping^2. |
@@ -242,7 +242,7 @@ Flags<[WrapperOnlyOption]>, HelpText<"Embed LLVM IR for runtime kernel fusion"> | |||
|
|||
def sycl_dump_device_code_EQ : Joined<["--", "-"], "sycl-dump-device-code=">, | |||
Flags<[WrapperOnlyOption]>, | |||
HelpText<"Path to the folder where the tool dumps SPIR-V device code. Other formats aren't dumped.">; | |||
HelpText<"Directory to dump offloading images to.">; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option mirrors the user facing option 'sycl-dump-device-code' which was introduced for the old offloading model here: #11132. In that PR, I see that we use this only for dumping SPIR-V code. If the idea is to extend this option to cover all possible device outputs, may be we should do this for the old offloading model as well?
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there is any interest in supporting additional formats for "old offloading model".
The old offloading model is supposed to be replaced with the new offloading model soon. Right?
FYI: non-SPIR-V targets seems to be happy with -fsycl-device-only output. See #17390.
If we have customers for this use case, please, file a feature request to handle it separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Suggested a nit and a possible followup. I am trying to think if we can add some testing for this.
We can add in a separate PR as well.
Thanks
@maksimsab, please, approve if there are no other change requests. |
I am trying to resolve the issue with the test locally. Need some time. |
I think before fixing the test, we need to align the way dry-run mode is handled in the code added for SYCL with the upstream approach. I suggest we remove the test in this PR and fix testing of SYCL mode as a separate change. |
OK. |
All failures are caused by lack of machines to run the tests. |
…g in clang-linker-wrapper The patch allows to test SYCL Offload Wrapping using clang-linker-wrapper in dry-run mode. Previously, it was tested by running the tool in non dry-run mode. The patch unites 2 debuging prints of "offload wrapper" step in clang-linker-wrapper in Verbose/DryRun modes. The patch returns the test case in linker-wrapper-sycl.cpp that has been removed in intel#17546.
Despite the option name sycl-dump-device-code it enables dumping of only SPIR-V files emitted by the translator tool. This change dumps device code right before embedding it into the fat object. The tool dumps offloading image of any format.