[clang] [llvm] [llvm][offload] Change Intel's SPIRV wrapper from ELF to OffloadBinary (PR #185413)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 12:53:06 PDT 2026


================
@@ -157,11 +157,30 @@ LLVM_ABI Error getAMDGPUMetaDataFromImage(
     uint16_t &ELFABIVersion);
 } // namespace amdgpu
 
+/// Containerizes an image into inner OffloadBinary format.
+/// Creates a nested OffloadBinary structure where the inner binary contains
+/// the raw image and associated metadata (version, format, triple, etc.).
+/// \param Binary The image to containerize.
+/// \param ImageKind The format of the image, e.g. SPIR-V or CUBIN.
+/// \param OffloadKind The expected consumer of the image, e.g. CUDA or OpenMP.
+/// \param ImageFlags Flags associated with the image, e.g. for AMDGPU the
+/// features.
+/// \param MetaData The key-value map of metadata to be associated with the
+/// image.
+LLVM_ABI Error containerizeImage(std::unique_ptr<MemoryBuffer> &Binary,
----------------
sarnex wrote:

If the existing one does it let's just keep it. I wrote the current one so always funny to dunk on myself a few months later

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


More information about the cfe-commits mailing list