[Openmp-commits] [PATCH] D96379: [OpenMP] Unify omptarget API and usage wrt. `__tgt_async_info`

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Feb 9 15:51:04 PST 2021


jdoerfert created this revision.
jdoerfert added reviewers: tianshilei1992, JonChesterfield.
Herald added subscribers: guansong, yaxunl.
Herald added a reviewer: bollu.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.

This patch unifies our libomptarget API in two ways:

- always pass a `__tgt_async_info` object, the Queue member decides if it is in use or not.
- (almost) always synchronize in the interface layer and not in the omptarget layer.

A side effect is that we now put all constructor and static initializer
kernels in a stream too, if the device utilizes `__tgt_async_info`.

The patch contains a TODO which can be addressed as we add support for
asynchronous malloc and free in the plugin API. This is the only
`synchronizeAsyncInfo` left in the omptarget layer.

Site note: On a V100 system the GridMini performance for small sizes
more than doubled.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96379

Files:
  openmp/libomptarget/src/interface.cpp
  openmp/libomptarget/src/omptarget.cpp
  openmp/libomptarget/src/private.h
  openmp/libomptarget/src/rtl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96379.322525.patch
Type: text/x-patch
Size: 25058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210209/4493a427/attachment-0001.bin>


More information about the Openmp-commits mailing list