[Openmp-commits] [PATCH] D111895: [OpenMP][Tools] Add omp_all_memory support for Archer

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Oct 15 09:14:38 PDT 2021


protze.joachim created this revision.
protze.joachim added a reviewer: Hahnfeld.
protze.joachim added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
protze.joachim requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

The semantic of `depend(out:omp_all_memory)` is quite similar to taskwait in that it separates all tasks (with dependency) created before an all_memory-task from all tasks (with dependency) created after an all_memory-task.
Only a single of such tasks can execute at a time. Similar to taskwait, we have a CV (AllMemory[1]) in the generating task to express the dependency sink semantic of an all_memory-task. In addition, AllMemory[0] describes the dependency source semantic of an all_memory-task. All tasks with dependency create an HB-arc towards the sink and terminate an HB-arc from the source.

Since we expect that not many applications will use such dependency, the support for handling the synchronization semantic is off by default and can be turned on using ARCHER_OPTION="all_memory=1". The most costly part is the precautionary posting of an HB-arc towards the sink, which represents a potentially contentious write from all concurrently executing sibling tasks. A warning is printed at runtime, when the option is off while such dependency is observed. In most cases the lazy activation will still lead to false alerts.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111895

Files:
  openmp/tools/archer/README.md
  openmp/tools/archer/ompt-tsan.cpp
  openmp/tools/archer/tests/task/omp_task_depend_all.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111895.380030.patch
Type: text/x-patch
Size: 15859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211015/2d5972de/attachment-0001.bin>


More information about the Openmp-commits mailing list