[llvm] [llvm][tools] Add support to llvm-offload-binary to unbundle spirv64-intel images (PR #184774)

Alex Duran via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 14:57:35 PST 2026


adurang wrote:

> > It is a single image with multiple objects. They need to be linked together at the end to "create" the final image.
> > AFAIR right now we are loading each image separately and there's no final step where we could link all of them if they were sepparate images. Even then, I'm not sure if liking existing sepparate images into would cause problems tbh.
> 
> I guess I'm just confused, because I thought this was the reason why Intel extended the LLVM OffloadBinary format to support multiple images in a single bundle.

The new OffloadBinary format could eventually be used to support the OpenMP images but currently libomptarget is not extracting the images following the format but using the __tgt_register_image approach so no metadata is reaching the plugins. The current liboffload interface doesn't allow to pass the metadata of the image either.

We could try to pass an OffloadBinary with all the spirv objects to the plugins directly but that would mean to embed an OffloadBinary inside another one. It would still be an ELF contains ELF contains SPIRV situation but at least it wouln't be an Intel specific format I guess. But this would require quite some time to implement so would be ok to properly document this direction and TODO for now?

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


More information about the llvm-commits mailing list