[OpenMP][libomptarget] Add AMDGPU NextGen plugin with asynchronous behavior
authorKevin Sala <kevin.sala@bsc.es>
Mon, 12 Dec 2022 17:13:48 +0000 (18:13 +0100)
committerKevin Sala <kevin.sala@bsc.es>
Thu, 15 Dec 2022 23:30:43 +0000 (00:30 +0100)
commit87e6b96b0009983996bfe0aa27d358008c1d1087
tree9a6ee74fd07b767c96857c0a3b0d010c4a30fe87
parent644f0f834d21250cf92a7c8d3b17aa1b683571f5
[OpenMP][libomptarget] Add AMDGPU NextGen plugin with asynchronous behavior

This commit adds the AMDGPU NextGen plugin inheriting from PluginInterface's classes.
It also implements the asynchronous behavior in the plugin operations: kernel launches
and memory transfers. To this end, it implements the concept of streams of asynchronous
operations. The streams are implemented using the HSA signals to define input and output
dependencies between asynchronous operations.

Missing features:
  - Retrieve the maximum number of threads per group that a kernel can run. This requires
    reading the image.
  - Implement __tgt_rtl_sync_event, not used on the libomptarget side.

Differential Revision: https://reviews.llvm.org/D138389
openmp/libomptarget/plugins-nextgen/CMakeLists.txt
openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt [new file with mode: 0644]
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp [new file with mode: 0644]
openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.h