[Openmp-commits] [PATCH] D81989: [OpenMP] Introduce low level dependency process to target offloading

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jun 16 20:46:58 PDT 2020


tianshilei1992 created this revision.
Herald added subscribers: openmp-commits, sstefan1, jfb, guansong, yaxunl.
Herald added a reviewer: jdoerfert.
Herald added a project: OpenMP.

Asynchronous offloading will be wrapped into a target task, and the
corresponding dependencies will go to the task. Only all dependencies are
full-filled, the task will be enqueued and dispatched. However, almost all
device runtime libraries provide ways for dependencies such that we don't need
to go back to host side to resolve the dependencies. For exmaple, we could wait
for a CUDA event before we push some operations into a stream. The wait is not
blocking so that all following enqueues will be proceeded. However, they will
not be executed until the waiting event is full-filled.

This patch lowers the dependency process of target task to the device side. It
supports depending on both host tasks and target tasks. For depending on target
tasks, the process goes to the device side. As for depending on host tasks,
current mechanism is still used with a tiny modification.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81989

Files:
  openmp/libomptarget/include/omptarget.h
  openmp/libomptarget/include/omptargetplugin.h
  openmp/libomptarget/plugins/cuda/src/rtl.cpp
  openmp/libomptarget/plugins/exports
  openmp/libomptarget/src/device.cpp
  openmp/libomptarget/src/exports
  openmp/libomptarget/src/interface.cpp
  openmp/libomptarget/src/omptarget.cpp
  openmp/libomptarget/src/private.h
  openmp/libomptarget/src/rtl.cpp
  openmp/libomptarget/src/rtl.h
  openmp/runtime/src/kmp.h
  openmp/runtime/src/kmp_taskdeps.cpp
  openmp/runtime/src/kmp_taskdeps.h
  openmp/runtime/src/kmp_tasking.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81989.271269.patch
Type: text/x-patch
Size: 65936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200617/12f8b5dc/attachment-0001.bin>


More information about the Openmp-commits mailing list