[Openmp-commits] [PATCH] D114274: [openmp][amdgpu] Make plugin robust to presence of explicit implicit arguments

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Nov 19 12:52:21 PST 2021


JonChesterfield created this revision.
JonChesterfield added reviewers: arsenm, estewart08.
Herald added subscribers: kerbowa, guansong, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
JonChesterfield requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1, wdng.
Herald added a reviewer: jdoerfert.
Herald added a project: OpenMP.

OpenMP (compiler) does not currently request any implicit kernel
arguments. OpenMP (runtime) allocates and initialises a reasonable guess at
the implicit kernel arguments anyway.

This change makes the plugin check the number of explicit arguments, instead
of all arguments, and adds handling to initialise a hostcall buffer at the
location requested by the back end (if said buffer is requested).

This is intended to keep things running while fixing the oversight in the
compiler (in D113538 <https://reviews.llvm.org/D113538>). Once that patch lands, this can be simplified to stop
allocating the extra implicit argument space, and only write the hostcall
pointer into the buffer once instead of twice.

Limited testing on this side, this represents a reasonable guess at what will
unblock the CI for D113538 <https://reviews.llvm.org/D113538>. In particular, it is a guess that the right kind is
HiddenHostcallBuffer and not HiddenPrintfBuffer, I don't know which is emitted
by the rocm toolchain.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114274

Files:
  openmp/libomptarget/plugins/amdgpu/impl/internal.h
  openmp/libomptarget/plugins/amdgpu/impl/system.cpp
  openmp/libomptarget/plugins/amdgpu/src/rtl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114274.388602.patch
Type: text/x-patch
Size: 4462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211119/94ca144e/attachment-0001.bin>


More information about the Openmp-commits mailing list