[all-commits] [llvm/llvm-project] 73d411: [OpenMP][Tools] Add omp_all_memory support for Archer

Joachim via All-commits all-commits at lists.llvm.org
Fri Jul 7 04:56:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 73d411d1b2c9c842bbaa167606720fed6ffc2243
      https://github.com/llvm/llvm-project/commit/73d411d1b2c9c842bbaa167606720fed6ffc2243
  Author: Joachim Jenke <jenke at itc.rwth-aachen.de>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M openmp/tools/archer/README.md
    M openmp/tools/archer/ompt-tsan.cpp
    A openmp/tools/archer/tests/task/omp_task_depend_all.c

  Log Message:
  -----------
  [OpenMP][Tools] Add omp_all_memory support for Archer

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.

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




More information about the All-commits mailing list