To support linking device code in different source files, it is necessary to
embed fat binary at host linking stage.
This patch emits an external symbol for fat binary in host codegen, then
embed the fat binary by lld through a linker script.
Paths
| Differential D46472
[HIP] Support offloading by linker script ClosedPublic Authored by yaxunl on May 4 2018, 2:09 PM.
Details Summary To support linking device code in different source files, it is necessary to This patch emits an external symbol for fat binary in host codegen, then
Diff Detail Event TimelineComment Actions The IRGen aspects of this seem reasonable, modulo a comment change. I don't feel qualified to judge the driver change.
yaxunl retitled this revision from [HIP] Support offloading by linkscript to [HIP] Support offloading by linker script.May 15 2018, 9:12 AM Comment Actions LGTM except for minor suggestions.
This revision is now accepted and ready to land.May 17 2018, 1:17 PM Comment Actions
Thanks. Will make changes when committing. Closed by commit rL332724: [HIP] Support offloading by linker script (authored by yaxunl). · Explain WhyMay 18 2018, 8:11 AM This revision was automatically updated to reflect the committed changes.
pcc added inline comments.
JonChesterfield added inline comments.
Revision Contents
Diff 145480 include/clang/Driver/Options.td
lib/CodeGen/CGCUDANV.cpp
lib/Driver/ToolChains/CommonArgs.h
lib/Driver/ToolChains/CommonArgs.cpp
lib/Driver/ToolChains/Gnu.cpp
test/CodeGenCUDA/device-stub.cu
|
Is this filename string only used for CUDA? If so, please rename it to make that clear, or at least add a comment.