[Openmp-commits] [openmp] [libomptarget] Support BE ELF files in plugins-nextgen (PR #83976)

Ulrich Weigand via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 14 08:38:02 PDT 2024


uweigand wrote:

> Do you have a GPU to run tests locally on? I would guess that the CPU targets don't requires a lot of the implicit argument handling or kernel argument handling so there's probably some overlooked behavior.

Unfortunately, I don't have an AMD GPU locally.  I've done another thorough review, and noticed a number of unintended changes in this PR:
- I had overlooked that cuda/src/rtl.cpp directly accesses Handler.getELFObjectFile
- When using ObjectFile::createELFObjectFile in the new findSymbolInImage, I was passing `/*InitContent=*/false` (copied from checkMachine).  While this is fine for checkMachine, when doing anything more complicated with the ELFObjectFile, this may cause problems
- There are some corner cases where using the new findSymbolInImage for simply checking symbol existance may return a different result than the original getSymbol - I cannot prove this breaks anything, but I cannot really exclude it either.

As a conservative option, I've now implemented a new approach here: https://github.com/llvm/llvm-project/pull/85246   This keeps the overall structure the same, but just replaces the ELF-specific types with more generic ELF types in the common-code interfaces.  This works the same on IBM Z, and I hope it will avoid introducing an breakage elsewhere (which I guess we'll see via build bot results if and when it can get committed)


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


More information about the Openmp-commits mailing list