[llvm] [Offload][L0] Add support for OffloadBinary format in L0 plugin (PR #185404)
Alex Duran via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 14:49:25 PDT 2026
================
@@ -1651,6 +1677,12 @@ int32_t GenericPluginTy::isPluginCompatible(StringRef Image) {
return HandleError(std::move(Err));
return *MatchOrErr;
}
+ case file_magic::offload_binary: {
----------------
adurang wrote:
We could get there but we need to add a few more things I think:
- SPIRV images are not currently considered valid (as they're wrapped inside something else that is valid) so we would need add support to validate them individually.
- We would need to allow plugins to say if they accept a BinaryOffload or not (even if they inner images would be valid that doesn't immediately mean that the unwrapping can be handled by the plugin). Currently the only things (afaik) that the plugins communicate to validate images is the ElfBits and the Triple.
- Currently, it seems to me that the model assumes that only one image type is accepted by each plugin (basically ELF) but we would need to able te state that they might support more than one format (e.g., the L0 plugin would support SPIRV, ELF and OffloadBinary).
https://github.com/llvm/llvm-project/pull/185404
More information about the llvm-commits
mailing list