[Openmp-commits] [PATCH] D113833: [OpenMP][WIP] Refactor global handling in plugins

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Nov 13 12:40:48 PST 2021


jdoerfert created this revision.
jdoerfert added reviewers: jhuber6, ggeorgakoudis, tianshilei1992, JonChesterfield.
Herald added subscribers: kerbowa, guansong, bollu, tpr, yaxunl, mgorny, nhaehnle, jvesely.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.

Global symbol handling is one of the common things the plugins do and we
should be uniform wrt. functionality, messaging, etc. The new
GlobalHandler will do most of the heavy lifting and the plugins simply
need to provide some information to it. Error checking and such is done
the same way for all plugins and more refactoring opportunities arise.

This removes two "functions" of the AMDGPU plugins for now:

1. Write the device environment into the image. This is something we should investigate for CUDA and add to the GlobalHandler. For now, it is a single HtoD transfer we pay extra.
2. If the device environment could not be transferred we used to check the architecture. The code needs to be ported to the llvm ELF handling and then we can do this again.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113833

Files:
  openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
  openmp/libomptarget/plugins/amdgpu/impl/interop_hsa.h
  openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
  openmp/libomptarget/plugins/common/CMakeLists.txt
  openmp/libomptarget/plugins/common/DeviceInterface/CMakeLists.txt
  openmp/libomptarget/plugins/common/DeviceInterface/DeviceInterface.h
  openmp/libomptarget/plugins/common/GlobalHandler/CMakeLists.txt
  openmp/libomptarget/plugins/common/GlobalHandler/GlobalHandler.h
  openmp/libomptarget/plugins/cuda/CMakeLists.txt
  openmp/libomptarget/plugins/cuda/src/rtl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113833.387045.patch
Type: text/x-patch
Size: 57062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211113/4afcfbe9/attachment-0001.bin>


More information about the Openmp-commits mailing list