[all-commits] [llvm/llvm-project] 5b67bc: [OpenMP] [OMPT] [2/8] Implemented a connector for ...

dhruvachak via All-commits all-commits at lists.llvm.org
Tue Nov 15 14:22:21 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b67bce787e4eeee1222c78bee7c0e9bc5563a3a
      https://github.com/llvm/llvm-project/commit/5b67bce787e4eeee1222c78bee7c0e9bc5563a3a
  Author: Dhruva Chakrabarti <Dhruva.Chakrabarti at amd.com>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M openmp/libomptarget/CMakeLists.txt
    A openmp/libomptarget/include/ompt_connector.h
    M openmp/libomptarget/src/CMakeLists.txt
    A openmp/libomptarget/src/ompt_callback.cpp
    M openmp/runtime/CMakeLists.txt
    M openmp/runtime/cmake/config-ix.cmake
    M openmp/runtime/src/CMakeLists.txt
    M openmp/runtime/src/exports_so.txt
    M openmp/runtime/src/ompt-general.cpp
    M openmp/runtime/src/ompt-specific.cpp
    M openmp/runtime/src/ompt-specific.h

  Log Message:
  -----------
  [OpenMP] [OMPT] [2/8] Implemented a connector for communication of OMPT callbacks between libraries.

This is part of a set of patches implementing OMPT target callback support and has been split out of the originally submitted https://reviews.llvm.org/D113728. The overall design can be found in https://rice.app.box.com/s/pf3gix2hs4d4o1aatwir1set05xmjljc

The purpose of this patch is to provide a way to register tool-provided callbacks into libomp when libomptarget is loaded.

Introduced a cmake variable LIBOMPTARGET_OMPT_SUPPORT that can be used to control OMPT target support. It follows host OMPT support, controlled by LIBOMP_HAVE_OMPT_SUPPORT.

Added a connector that can be used to communicate between OMPT implementations in libomp and libomptarget or libomptarget and a plugin.

Added a global constructor in libomptarget that uses the connector to force registration of tool-provided callbacks in libomp. A pair of init and fini functions are provided to libomp as part of the connect process which will be used to register the tool-provided callbacks in libomptarget.

Patch from John Mellor-Crummey <johnmc at rice.edu>
(With contributions from Dhruva Chakrabarti <Dhruva.Chakrabarti at amd.com>)

Reviewed By: dreachem, jhuber6

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




More information about the All-commits mailing list