-
Notifications
You must be signed in to change notification settings - Fork 796
[RFC] thinLTO for SYCL #15083
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
[RFC] thinLTO for SYCL #15083
Changes from 2 commits
817a0c9
70ee0e0
00a28c1
d3ccfd1
8c4edb3
3322684
43df8c9
9922d30
1deaea2
c68e797
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| set(LLVM_LINK_COMPONENTS | ||
| ${LLVM_TARGETS_TO_BUILD} | ||
| BitReader | ||
| BitWriter | ||
| Core | ||
| BinaryFormat | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,9 +17,9 @@ | |
|
|
||
| #if defined(__SPIR__) || defined(__SPIRV__) || defined(__NVPTX__) | ||
| #ifdef __SYCL_DEVICE_ONLY__ | ||
| #define DEVICE_EXTERNAL SYCL_EXTERNAL __attribute__((weak)) | ||
| #define DEVICE_EXTERNAL SYCL_EXTERNAL | ||
| #else // __SYCL_DEVICE_ONLY__ | ||
| #define DEVICE_EXTERNAL __attribute__((weak)) | ||
| #define DEVICE_EXTERNAL | ||
| #endif // __SYCL_DEVICE_ONLY__ | ||
|
Comment on lines
+20
to
23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is required to get libdevice functions linked in by the thinLTO function importing infrastructure, see here. I'm looking for a better solution for this, I just kept this here in case anybody plans on trying the prototype. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose importing devicelib symbols at compile step can be a solution (see #15114). On the other hand, I recall discussing the possibility of linking device libraries with upstream maintainers, who expressed a preference for shifting device library linking from the "compile" to the "link" step. It would be ideal if we could discover a solution that aligns with the long-term strategy of upstream and enables us to utilize the thinLTO framework for offload code linking, thereby avoiding the use of weak symbols. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. attention to @mdtoguchi who has been looking at importing devicelib at compile step from the SYCL perspective. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we already perform device library linking at link time we can consider abandoning the efforts to pull them into the compilation step. My main concern with performing at the link step is the communication required from the driver to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with @mdtoguchi. Unless user wants to change the names/location or disable linking of device libraries, driver should not have any logic to handle device code linking other than invoking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is very interesting. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| #define DEVICE_EXTERN_C DEVICE_EXTERNAL EXTERN_C | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.