-
Notifications
You must be signed in to change notification settings - Fork 798
[Driver][SYCL] Use LLVM-IR based device libraries for device linking #13524
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
This change represents 2 changes.
1. Update the build to create LLVM-IR based device libraries.
This is done by using the existing -fsycl-device-only functionality to
create the device libraries that are used during device link.
2. Update the compiler driver to use the LLVM-IR based device
libraries.
When performing the device linking instead of performing a full unbundle
of the device libraries and using the device binary that was extracted.
This streamlines the device linking behaviors, completely removing the
cumbersome unbundling step from the process, freeing up a number of
exteral tool calls.
| C.MakeAction<OffloadAction>( | ||
| Dep, SYCLDeviceLibsUnbundleAction->getType()); | ||
| DeviceLinkObjects.push_back(SYCLDeviceLibsDependenciesAction); | ||
| if (TC->getTriple().isNVPTX()) { |
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.
Why do we need a separate path for NVPTX backend?
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.
There are specific cubin files that are in the fat objects that are used. I only created .bc device libraries for the SYCL specific linking.
|
Windows test fails might just require test update |
asudarsa
left a comment
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.
Changes look good to me. It will help to get this checked in soon. One important pointer is the deviation for NVPTX backends. It will help to understand why we need that deviation and if it can be avoided.
Thanks
I have updated the windows tests accordingly and also consolidated the behaviors for input files as the inputs for Windows and Linux are both .bc files instead of differing object files. |
asudarsa
left a comment
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. Thanks
uditagarwal97
left a comment
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!
|
@intel/dpcpp-clang-driver-reviewers, could this be reviewed? |
This change represents 2 changes.
This is done by using the existing -fsycl-device-only functionality to create the device libraries that are used during device link.
When performing the device linking instead of performing a full unbundle of the device libraries and using the device binary that was extracted.
This streamlines the device linking behaviors, completely removing the cumbersome unbundling step from the process, freeing up a number of exteral tool calls.