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

dhruvachak via All-commits all-commits at lists.llvm.org
Mon Oct 31 10:33:52 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f94c2679cb1db92ce4103487bf0247eca6e4d722
      https://github.com/llvm/llvm-project/commit/f94c2679cb1db92ce4103487bf0247eca6e4d722
  Author: Dhruva Chakrabarti <Dhruva.Chakrabarti at amd.com>
  Date:   2022-10-31 (Mon, 31 Oct 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.

Depends on D123429

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

Reviewed By: dreachem

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




More information about the All-commits mailing list