llvm-project
b0e35e5f - [Offloading] Add support for compressed OffloadBinary types (#222774)

Commit
51 days ago
[Offloading] Add support for compressed OffloadBinary types (#222774) Summary: Offload binaries are used to store many heterogenous architectures into a singel offloading blob. These lists can get very large so this PR adds the option to compress them with the LLVM provided compression libraries. The implementation is quite simple, we simply compress all the buffers after the header into a single compressed blob, then re-construct the header. Extracting is the reverse. The biggest change is that the offload binary now **owns** the memory, whereas before we simply took a reference to it. This is necessary because the decompression must create new memory compared to what the user provided. This adds an extra copy internally, but it also simplifies the V2 additions. This does not wire up any clang/HIP support, just providing the functionality. --- <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
Author
Parents
Loading