[all-commits] [llvm/llvm-project] 89c82c: [OpenMP] Add non-blocking support for target nowai...

Guilherme Valarini via All-commits all-commits at lists.llvm.org
Wed Dec 14 09:05:26 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89c82c83949b2bea26ea574c88c1ceada399d7d8
      https://github.com/llvm/llvm-project/commit/89c82c83949b2bea26ea574c88c1ceada399d7d8
  Author: Guilherme Valarini <guilherme.a.valarini at gmail.com>
  Date:   2022-12-14 (Wed, 14 Dec 2022)

  Changed paths:
    M openmp/libomptarget/include/device.h
    M openmp/libomptarget/include/omptarget.h
    M openmp/libomptarget/include/omptargetplugin.h
    M openmp/libomptarget/include/rtl.h
    M openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
    M openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
    M openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
    M openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp
    M openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
    M openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
    M openmp/libomptarget/plugins/cuda/src/rtl.cpp
    M openmp/libomptarget/src/device.cpp
    M openmp/libomptarget/src/exports
    M openmp/libomptarget/src/interface.cpp
    M openmp/libomptarget/src/omptarget.cpp
    M openmp/libomptarget/src/private.h
    M openmp/libomptarget/src/rtl.cpp
    M openmp/runtime/src/kmp.h
    M openmp/runtime/src/kmp_tasking.cpp

  Log Message:
  -----------
  [OpenMP] Add non-blocking support for target nowait regions

This patch better integrates the target nowait functions with the tasking runtime. It splits the nowait execution into two stages: a dispatch stage, which triggers all the necessary asynchronous device operations and stores a set of post-processing procedures that must be executed after said ops; and a synchronization stage, responsible for synchronizing the previous operations in a non-blocking manner and running the appropriate post-processing functions. Suppose during the synchronization stage the operations are not completed. In that case, the attached hidden helper task is re-enqueued to any hidden helper thread to be later synchronized, allowing other target nowait regions to be concurrently dispatched.

Reviewed By: jdoerfert, tianshilei1992

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




More information about the All-commits mailing list