[OpenMP] Improve AMDGPU Plugin
authorJohannes Doerfert <johannes@jdoerfert.de>
Sat, 17 Dec 2022 07:46:59 +0000 (23:46 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 20 Dec 2022 03:09:43 +0000 (19:09 -0800)
commitfb2c42df41cb01e1122fd4e9c81e1f4bc5592b12
treeac09ca311feb5bdc831aea77f40b03838577b496
parentab17a08d0f6ffd93cb25b46a4ed5e6ebe5af530e
[OpenMP] Improve AMDGPU Plugin

With this patch we:
- pick more sensible defaults for the number of teams, inspired by the
  old plugin, and configured via LIBOMPTARGET_AMDGPU_TEAMS_PER_CU.
- check the input signal of a kernel launch late, after the queue lock
  was taken, to avoid a barrier packet more often.
- copy the kernel arguments in one swoop into the appropriate memory.
- manually specialize the callbacks to avoid potential indirect calls.
llvm/include/llvm/Frontend/OpenMP/OMPGridValues.h
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h