[llvm] [Offload] Introduce offload-tblgen and initial new API implementation (PR #108413)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 09:45:47 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `offload` at step 5 "compile-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/10979

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 5 (compile-openmp) failure: build (failure)
...
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/opt: WARNING: failed to create target machine for 'nvptx64-nvidia-cuda': unable to get target for 'nvptx64-nvidia-cuda', see --version and --triple.
39.513 [24/28/2185] Packaging LLVM offloading binary libomptarget-nvptx-sm_72.bc.out
39.523 [23/28/2186] Embedding LLVM offloading binary in devicertl-nvptx-sm_70.o
39.531 [23/27/2187] Embedding LLVM offloading binary in devicertl-nvptx-sm_72.o
39.767 [23/26/2188] Optimizing LLVM bitcode libomptarget-nvptx-sm_75.bc
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/opt: WARNING: failed to create target machine for 'nvptx64-nvidia-cuda': unable to get target for 'nvptx64-nvidia-cuda', see --version and --triple.
39.771 [22/26/2189] Packaging LLVM offloading binary libomptarget-nvptx-sm_75.bc.out
39.795 [21/26/2190] Embedding LLVM offloading binary in devicertl-nvptx-sm_75.o
39.868 [21/25/2191] Building CXX object offload/src/CMakeFiles/omptarget.dir/DeviceImage.cpp.o
40.176 [21/24/2192] Building CXX object offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/offload-tblgen.cpp.o
FAILED: offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/offload-tblgen.cpp.o 
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DOMPT_SUPPORT=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/llvm/include -I/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/include -I/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/offload-tblgen.cpp.o -MF offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/offload-tblgen.cpp.o.d -o offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/offload-tblgen.cpp.o -c /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/offload-tblgen.cpp
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/offload-tblgen.cpp:92:10: error: no matching function for call to 'TableGenMain'
   92 |   return TableGenMain(argv[0], &OffloadTableGenMain);
      |          ^~~~~~~~~~~~
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/llvm/include/llvm/TableGen/Main.h:27:5: note: candidate function not viable: no known conversion from 'bool (*)(raw_ostream &, RecordKeeper &)' to 'std::function<TableGenMainFn>' (aka 'function<bool (raw_ostream &, const RecordKeeper &)>') for 2nd argument
   27 | int TableGenMain(const char *argv0,
      |     ^
   28 |                  std::function<TableGenMainFn> MainFn = nullptr);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
40.228 [21/23/2193] Building CXX object offload/tools/kernelreplay/CMakeFiles/llvm-omp-kernel-replay.dir/llvm-omp-kernel-replay.cpp.o
40.364 [21/22/2194] Optimizing LLVM bitcode libomptarget-nvptx-sm_80.bc
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/bin/opt: WARNING: failed to create target machine for 'nvptx64-nvidia-cuda': unable to get target for 'nvptx64-nvidia-cuda', see --version and --triple.
40.372 [21/21/2195] Building CXX object offload/liboffload/CMakeFiles/LLVMOffload.dir/src/OffloadLib.cpp.o
40.594 [21/20/2196] Building CXX object offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/EntryPointGen.cpp.o
FAILED: offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/EntryPointGen.cpp.o 
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DOMPT_SUPPORT=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/llvm/include -I/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/include -I/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/EntryPointGen.cpp.o -MF offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/EntryPointGen.cpp.o.d -o offload/tools/offload-tblgen/CMakeFiles/offload-tblgen.dir/EntryPointGen.cpp.o -c /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/EntryPointGen.cpp
In file included from /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/EntryPointGen.cpp:17:
In file included from /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/GenCommon.hpp:11:
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/RecordTypes.hpp:81:25: error: no matching constructor for initialization of 'EnumValueRec'
   81 |       vals.emplace_back(EnumValueRec{Val});
      |                         ^           ~~~~~
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/RecordTypes.hpp:64:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const llvm::Record *' to 'const EnumValueRec' for 1st argument
   64 | class EnumValueRec {
      |       ^~~~~~~~~~~~
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/RecordTypes.hpp:64:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const llvm::Record *' to 'EnumValueRec' for 1st argument
   64 | class EnumValueRec {
      |       ^~~~~~~~~~~~
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/RecordTypes.hpp:66:12: note: candidate constructor not viable: 1st argument ('const llvm::Record *') would lose const qualifier
   66 |   explicit EnumValueRec(Record *rec) : rec(rec) {}
      |            ^            ~~~~~~~~~~~
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/RecordTypes.hpp:115:28: error: no matching conversion for functional-style cast from 'const llvm::Record *' to 'StructMemberRec'
  115 |       members.emplace_back(StructMemberRec(Member));
      |                            ^~~~~~~~~~~~~~~~~~~~~~~
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/RecordTypes.hpp:100:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const llvm::Record *' to 'const StructMemberRec' for 1st argument
  100 | class StructMemberRec {
      |       ^~~~~~~~~~~~~~~
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/tools/offload-tblgen/RecordTypes.hpp:100:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const llvm::Record *' to 'StructMemberRec' for 1st argument

```

</details>

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


More information about the llvm-commits mailing list