[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 20 09:23:41 PST 2025


jhuber6 wrote:

> currently HIP runtime loads fat binary by itself for non-compressed fat binary. It needs to switch to use comgr for loading fat binary. Some math libs compile assembly code to code objects then bundle them to fat binary. Such math libs need to switch to use tools for packing offload binary. Also, zstd compression of code objects for different GPU arch by taking advantage of redundancy in ISA is critical for math libraries. The offload binary needs to support zstd compression.

We could probably just keep backwards compatibility by checking file magic now that the bundles have them. Does it do anything special during optimization? The offload binary is just a big blob, basically looking like this. I figured any optimization algorithm would be able to figure out the repetition itself.
```
<header>
<big binary blob>
<header>
<big binary blob>
...
<header>
<big binary blob>
```

https://github.com/llvm/llvm-project/pull/122307


More information about the cfe-commits mailing list