aboutsummaryrefslogtreecommitdiff
path: root/openmp/docs
diff options
context:
space:
mode:
authorTim Gymnich <tim@gymni.ch>2024-06-14 16:35:23 +0200
committerGitHub <noreply@github.com>2024-06-14 07:35:23 -0700
commit597d2f7662c31cae4c8a54cc27e2ea12833380ea (patch)
tree3eba2299c868a698fead7b8f75f6e6d8f0fd3518 /openmp/docs
parent43e6f46936e177e47de6627a74b047ba27561b44 (diff)
downloadllvm-597d2f7662c31cae4c8a54cc27e2ea12833380ea.zip
llvm-597d2f7662c31cae4c8a54cc27e2ea12833380ea.tar.gz
llvm-597d2f7662c31cae4c8a54cc27e2ea12833380ea.tar.bz2
[OpenMP] Add Environment Variable to disable Reuse of Blocks for High Loop Trip Counts (#89239)
Sometimes it might be beneficial to spawn more thread blocks instead of reusing existing for multiple loop iterations. **Alternatives considered:** Make `DefaultNumBlocks` settable via an environment variable. --------- Co-authored-by: Joseph Huber <huberjn@outlook.com>
Diffstat (limited to 'openmp/docs')
-rw-r--r--openmp/docs/design/Runtimes.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/openmp/docs/design/Runtimes.rst b/openmp/docs/design/Runtimes.rst
index f8a8cb8..98dd984 100644
--- a/openmp/docs/design/Runtimes.rst
+++ b/openmp/docs/design/Runtimes.rst
@@ -742,6 +742,7 @@ variables is defined below.
* ``LIBOMPTARGET_JIT_PRE_OPT_IR_MODULE=<out:Filename> (LLVM-IR file)``
* ``LIBOMPTARGET_JIT_POST_OPT_IR_MODULE=<out:Filename> (LLVM-IR file)``
* ``LIBOMPTARGET_MIN_THREADS_FOR_LOW_TRIP_COUNT=<Num> (default: 32)``
+ * ``LIBOMPTARGET_REUSE_BLOCKS_FOR_HIGH_TRIP_COUNT=[TRUE/FALSE] (default TRUE)``
LIBOMPTARGET_DEBUG
""""""""""""""""""
@@ -1162,6 +1163,12 @@ of threads possible times the number of teams (aka. blocks) the device prefers
count to increase outer (team/block) parallelism. The thread count will never
be reduced below the value passed for this environment variable though.
+LIBOMPTARGET_REUSE_BLOCKS_FOR_HIGH_TRIP_COUNT
+"""""""""""""""""""""""""""""""""""""""""""""
+
+This environment variable can be used to control how the OpenMP runtime assigns
+blocks to loops with high trip counts. By default we reuse existing blocks
+rather than spawning new blocks.
.. _libomptarget_plugin: