[Openmp-commits] [PATCH] D113728: [libomptarget] [amdgpu] Foundation for OMPT target callback support

Dhruva Chakrabarti via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 22 14:29:03 PST 2021


dhruvachak added inline comments.


================
Comment at: openmp/runtime/src/ompt-general.cpp:511-521
 void ompt_fini() {
   if (ompt_enabled.enabled
 #if OMPD_SUPPORT
       && ompt_start_tool_result && ompt_start_tool_result->finalize
 #endif
   ) {
+    if (libomptarget_ompt_result) {
----------------
protze.joachim wrote:
> I think, we need to reorder the conditions to make sure that target finalize is called even if the tool does not register a finalize callback. We should check the callback pointer in any case, even without OMPD support.
Made the change in the next version. I think we should check for NULL-ness unconditionally, so removed the OMPD_SUPPORT ifdef.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113728



More information about the Openmp-commits mailing list