[all-commits] [llvm/llvm-project] 6629a9: [OpenMP] Improve default block count selection fow...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Mon Jun 5 16:36:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6629a96a8ce5f07c72bd4931180a3ca9fc535cbb
      https://github.com/llvm/llvm-project/commit/6629a96a8ce5f07c72bd4931180a3ca9fc535cbb
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2023-06-05 (Mon, 05 Jun 2023)

  Changed paths:
    M openmp/docs/design/Runtimes.rst
    M openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
    M openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
    A openmp/libomptarget/test/offloading/small_trip_count.c

  Log Message:
  -----------
  [OpenMP] Improve default block count selection fow low block counts

If a combined loop has insufficient parallelism (= low trip count), we
might end up with too few teams/blocks. To counter that we can reduce
the number of threads per team we use. This patch implements a heuristic
and exposes a new environment variable to control the minimum of threads
to be employed in this case.

Issue reported by:
Felipe Cabarcas Jaramillo <cabarcas at udel.edu> (@fel-cab).

Reviewed By: tianshilei1992

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




More information about the All-commits mailing list