[clang] [ClangOffloadBundler] Add file size to header (PR #88827)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 09:00:20 PDT 2024


jhuber6 wrote:

> > Isn't this ABI breaking since we're changing the size of the struct? Shouldn't that necessitate a new version?
> > Also unrelated, I wonder if there's a future where we can use the ClangOffloadPackager format in the HIP runtime.
> 
> I think you are right. Although this feature has not been used extensively, it is better to bump up the version to keep backward compatibility.
> 
> Currently we are moving the extraction of code object from fat binary from runtime to comgr. We can treat the offload packager format as another flavor of fat binary. We only need to pass a pointer to sufficient information to __hipRegisterFatBinary, and let runtime pass that pointer to comgr, then comgr do the extraction. comgr just needs to identify it is offload packager format and handle it properly.

Yeah, it's got magic bytes so it should be fairly trivial so long as someone includes the code to extract it (Which is pretty simple as well).

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


More information about the cfe-commits mailing list