[Openmp-commits] [PATCH] D117627: [OpenMP] Introduce an environment variable to disable atomic map clauses

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 18 17:02:10 PST 2022


jdoerfert created this revision.
jdoerfert added reviewers: ye-luo, grokos, JonChesterfield, tianshilei1992, jhuber6.
Herald added subscribers: guansong, bollu, yaxunl.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.

Atomic handling of map clauses was introduced to comply with the OpenMP
standard (see D104418 <https://reviews.llvm.org/D104418>). However, many apps won't need this feature which
can be costly in certain situations. To allow for applications to
opt-out we now introduce the `LIBOMPTARGET_MAP_FORCE_ATOMIC` environment
flag that voids the atomicity guarantee of the standard for map clauses
again, shifting the burden to the user.

This patch also de-duplicates the code that introduces the events used
to enforce atomicity as a cleanup.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117627

Files:
  openmp/docs/design/Runtimes.rst
  openmp/libomptarget/include/device.h
  openmp/libomptarget/src/device.cpp
  openmp/libomptarget/src/omptarget.cpp
  openmp/libomptarget/src/rtl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117627.401044.patch
Type: text/x-patch
Size: 8151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220119/d5ec5e06/attachment.bin>


More information about the Openmp-commits mailing list