[all-commits] [llvm/llvm-project] 8cd1f0: [OpenMP] [OMPT] [amdgpu] [4/8] Implemented callbac...

dhruvachak via All-commits all-commits at lists.llvm.org
Tue May 2 09:36:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8cd1f0d8885fd69c452c6bf3fb04514d06c899b0
      https://github.com/llvm/llvm-project/commit/8cd1f0d8885fd69c452c6bf3fb04514d06c899b0
  Author: Dhruva Chakrabarti <Dhruva.Chakrabarti at amd.com>
  Date:   2023-05-02 (Tue, 02 May 2023)

  Changed paths:
    M openmp/libomptarget/include/ompt_device_callbacks.h
    M openmp/libomptarget/plugins-nextgen/CMakeLists.txt
    M openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
    M openmp/libomptarget/plugins-nextgen/common/CMakeLists.txt
    A openmp/libomptarget/plugins-nextgen/common/OMPT/CMakeLists.txt
    A openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp
    M openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt
    M openmp/libomptarget/plugins-nextgen/cuda/CMakeLists.txt
    M openmp/libomptarget/src/CMakeLists.txt
    A openmp/libomptarget/src/OmptCallback.cpp
    M openmp/libomptarget/src/exports
    R openmp/libomptarget/src/ompt_callback.cpp
    M openmp/libomptarget/src/rtl.cpp

  Log Message:
  -----------
  [OpenMP] [OMPT] [amdgpu] [4/8] Implemented callback registration in nextgen plugins

The purpose of this patch is to Implement registration of callback functions in the generic plugin by looking up corresponding callbacks in libomptarget. The overall design document is https://rice.app.box.com/s/pf3gix2hs4d4o1aatwir1set05xmjljc

Defined an object of type OmptDeviceCallbacksTy in the amdgpu plugin for holding the tool-provided callback functions. Implemented a global constructor in the plugin that creates a connector object to connect with libomptarget. The callbacks that are already registered with libomptarget are looked up and registered with the plugin.

Combined with an internal patch from Dhruva Chakrabarti, which fixes the OMPT initialization ordering.
Achieved through removal of the constructor attribute from ompt_init.

Patch from John Mellor-Crummey <johnmc at rice.edu>
With contributions from:
Dhruva Chakrabarti <Dhruva.Chakrabarti at amd.com>
Michael Halkenhaeuser <MichaelGerald.Halkenhauser at amd.com>

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




More information about the All-commits mailing list