[llvm] [Liboffload] Add function for checking ELF file device compatibility (PR #156259)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 31 11:40:10 PDT 2025
jhuber6 wrote:
> > ELF is too specific, just make it an image and let the runtime check if it's LLVM-IR, PTX, ELF, SPIR-V, whatever.
>
> Thanks for your feedback! How would you do that since my goal here is to call the `isELFCompatible` function of the device plugin?
Use the same type of entry point `libomptarget` uses. We only support LLVM-IR and ELF right now, but that will likely be expanded in the future. Though, a part of me is wondering if we even need this. We already have a load image function. Couldn't people just try to load the image and check the error? I guess this is necessary in cases where people would want to know if an image can run on a device, but not actually load it if it is.
https://github.com/llvm/llvm-project/pull/156259
More information about the llvm-commits
mailing list