[Openmp-commits] [PATCH] D127367: [OpenMP] [OMPT] [7/8] Invoke tool-supplied callbacks before and after target launch and data transfer operations

Jan-Patrick Lehr via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 1 13:02:11 PST 2022


jplehr added inline comments.


================
Comment at: openmp/libomptarget/src/device.cpp:594
+  /// RAII to establish tool anchors before and after data allocation
+  OmptInterfaceTargetDataOpRAII TgtDataAlloc(
+      RTLDeviceID, Size, HstPtr, nullptr /* TgtPtr */, ompt_target_data_alloc);
----------------
I wonder if these RAII objects are constructed when OMPT support is not built, or if it is optimized away in such cases?


================
Comment at: openmp/libomptarget/src/device.cpp:624
+  /// RAII to establish tool anchors before and after data submit
+  OmptInterfaceTargetDataOpRAII TargetDataSubmitRAII(
+      RTLDeviceID, Size, HstPtrBegin, TgtPtrBegin,
----------------
In the asynchronous case, the lifetime of the RAII object is probably too short to account for the actual data transfer events.


================
Comment at: openmp/libomptarget/src/device.cpp:651
+  /// RAII to establish tool anchors before and after data retrieval
+  OmptInterfaceTargetDataOpRAII TargetDataRetrieve(
+      RTLDeviceID, Size, HstPtrBegin, TgtPtrBegin,
----------------
In the asynchronous case, the lifetime of the RAII object is probably too short to account for the actual data transfer events.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127367/new/

https://reviews.llvm.org/D127367



More information about the Openmp-commits mailing list