-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][thinLTO] Split early when thinLTO is enabled #14259
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
Signed-off-by: Sarnie, Nick <[email protected]>
Signed-off-by: Sarnie, Nick <[email protected]>
Hi @sarnex Thanks for adding this change. Will it be possible to provide a short write-up that showcases a small example and show how the compilation proceeds with the changes here? Thanks |
@asudarsa just added this to the commit description, 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.
All changes outside 'Driver.cpp' looks good to me. Will let @mdtoguchi comment on that part.
Thanks Nick.
Signed-off-by: Sarnie, Nick <[email protected]>
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.
OK for driver. Even with the simplistic nature of what is being performed, all of the additional actions required to work the table/listfile isn't very pretty.
@mdtoguchi Thanks Mike. If you have an idea on how I could rework this change to be cleaner please let me know, I'm happy to do it in a follow-up PR. |
HIP failure #14300 |
This change implements driver changes to call
sycl-post-link
during-c
when thinLTO is enabled, and updatesclang-offload-packager
to accept response files (same format as temp file list), which will be generated when we callclang
on each output ofsycl-post-link
.I will add a test for the
clang-offload-packager
changes later, because we rely on changes in other PRs to test the full flow. However, the code is already being hit because we compilelibdevice
with thinLTO when compiling for the new offload model.For a given file
a.cpp
that results in two total splits, the following will happen:sycl-post-link
ona.bc
sycl-post-link
llvm-foreach
with the regular backend job that would be called normally on eachbc
file from 2)clang-offload-packager
with the output of 3 which is a list of thebc
files from eachclang
run, with a '@' appended to the file pathclang-offload-packager
reads each entry inside 4) and adds each to the fat objectclang-linker-wrapper
extracts the fat object from 5) and finds all of the files