[Openmp-commits] [PATCH] D123564: [OpenMP][doc] Add documents for barrier related environment variables

Misono Tomohiro via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Apr 12 19:54:24 PDT 2022


t-msn updated this revision to Diff 422381.
t-msn added a comment.

Follow suggestions by jlpeyton. Thanks a lot.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123564

Files:
  openmp/docs/design/Runtimes.rst


Index: openmp/docs/design/Runtimes.rst
===================================================================
--- openmp/docs/design/Runtimes.rst
+++ openmp/docs/design/Runtimes.rst
@@ -433,6 +433,33 @@
 
 **Default:** ``load_balance`` (on all supported platforms)
 
+KMP_FORKJOIN_BARRIER
+""""""""""""""""""""
+Specifies log2 of branching-factor of forkjoin barrier.
+This only has a meaning if tree or hyper barrier pattern is used.
+
+| **Syntax:** ``KMP_FORKJOIN_BARRIER=<factor-for-gather>,<factor-for-release>``
+| **Default:** 2,2
+
+KMP_FORKJOIN_BARRIER_PATTERN
+""""""""""""""""""""""""""""
+Specifies barrier pattern of forkjoin barrier which is used for the parallel and teams constructs.
+As libomp barrier adopts centralized barrier, barrier pattern can be specified for gather
+and release phase respectively.
+
+**Currently supported patterns:**
+
+* ``linear``: Linear centralized barrier
+* ``tree``: Static tree barrier. Branching-factor is set by ``KMP_FORKJOIN_BARRIER``
+* ``hyper``: Like tree but use hyper-cube. Branching-factor is set by ``KMP_FORKJOIN_BARRIER``
+* ``hier``: Like tree but use system's hierarchical information of caches
+* ``dist``: Two-level distributed barrier. To use this, all barrier patterns must be
+  specified as dist
+
+| **Syntax:** ``KMP_FORKJOIN_BARRIER_PATTERN=<gather-pattern>,<release-pattern>``
+| **Default:** hyper,hyper
+| **Related environment variable:** ``KMP_PLAIN_BARRIER_PATTERN``, ``KMP_REDUCTION_BARRIER_PATTERN``
+
 KMP_HOT_TEAMS_MAX_LEVEL
 """""""""""""""""""""""
 Sets the maximum nested level to which teams of threads will be hot.
@@ -593,6 +620,41 @@
 | **Default:** ``throughput``
 | **Related environment variable:** ``KMP_BLOCKTIME`` and ``OMP_WAIT_POLICY``
 
+KMP_PLAIN_BARRIER
+"""""""""""""""""
+Specifies log2 of branching-factor of plain barrier.
+This only has a meaning if tree or hyper barrier pattern is used.
+
+| **Syntax:** ``KMP_PLAIN_BARRIER=<factor-for-gather>,<factor-for-release>``
+| **Default:** 2,2
+
+KMP_PLAIN_BARRIER_PATTERN
+"""""""""""""""""""""""""
+Specifies barrier pattern of plain barrier which is used for ``#pragma omp barrier`` and
+implicit barriers at the end of worksharing constructs.
+See ``KMP_FORKJOIN_BARRIER_PATTERN`` for currently supported patterns.
+
+| **Syntax:** ``KMP_PLAIN_BARRIER_PATTERN=<gather-pattern>,<release-patern>``
+| **Default:** hyper,hyper
+| **Related environment variable:** ``KMP_FORKJOIN_BARRIER_PATTERN``, ``KMP_REDUCTION_BARRIER_PATTERN``
+
+KMP_REDUCTION_BARRIER
+"""""""""""""""""""""
+Specifies log2 of branching-factor of reduction barrier.
+This only has a meaning if tree or hyper barrier pattern is used.
+
+| **Syntax:** ``KMP_REDUCTION_BARRIER=<factor-for-gather>,<factor-for-release>``
+| **Default:** 1,1
+
+KMP_REDUCTION_BARRIER_PATTERN
+"""""""""""""""""""""""""""""
+Specifies barrier pattern of reduction barrier which is used in reduction.
+See ``KMP_FORKJOIN_BARRIER_PATTERN`` for currently supported patterns.
+
+| **Syntax:** ``KMP_REDUCTION_BARRIER_PATTERN=<gather-pattern>,<release-pattern>``
+| **Default:** hyper,hyper
+| **Related environment variable:** ``KMP_FORKJOIN_BARRIER_PATTERN``, ``KMP_PLAIN_BARRIER_PATTERN``
+
 KMP_SETTINGS
 """"""""""""
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123564.422381.patch
Type: text/x-patch
Size: 3220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220413/65b79002/attachment.bin>


More information about the Openmp-commits mailing list