[all-commits] [llvm/llvm-project] 758b84: [OpenMP] Unify omptarget API and usage wrt. `__tgt...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Tue Feb 16 13:38:24 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 758b8499310a5d44a41de67d656bd32dc3fd1023
      https://github.com/llvm/llvm-project/commit/758b8499310a5d44a41de67d656bd32dc3fd1023
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-02-16 (Tue, 16 Feb 2021)

  Changed paths:
    M openmp/libomptarget/src/api.cpp
    M openmp/libomptarget/src/device.cpp
    M openmp/libomptarget/src/device.h
    M openmp/libomptarget/src/interface.cpp
    M openmp/libomptarget/src/omptarget.cpp
    M openmp/libomptarget/src/private.h
    M openmp/libomptarget/src/rtl.cpp

  Log Message:
  -----------
  [OpenMP] Unify omptarget API and usage wrt. `__tgt_async_info`

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.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D96379




More information about the All-commits mailing list