[clang] [HIP] Support compressing device binary (PR #67162)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 29 09:40:32 PDT 2023
yxsamliu wrote:
> Unrelated, I need to hurry up and try to make the new driver the default for CUDA and HIP upstream at some point.
>
> I've had some thoughts about how to accomplish this in the past. For the new driver, `.llvm.offloading` is a single section that contains all of the embedded device code to create a fat binary. It should be possible to use [ELF compression](https://blogs.oracle.com/solaris/post/elf-section-compression) to reduce the size of that binary. Can we do something similar here? If memory serves, the `clang-offload-bundler` does a similar section embedding for object files. This wouldn't work for LLVM-IR host binaries however, since the host binary won't be an ELF. Also it's not exactly portable with COFF.
>
> @MaskRay do you know if ELF compression is feasible for this application?
We need to support compression/uncompression of standalone bundled bitcode, and standalone bundled code objects that are not embedded in ELF or COFF binaries. An OS-neutral binary format is preferred.
https://github.com/llvm/llvm-project/pull/67162
More information about the cfe-commits
mailing list