[Openmp-commits] [PATCH] D113012: Set default blocktime to 0 for hybrid CPU

Nawrin Sultana via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 2 06:30:03 PDT 2021

Nawrin created this revision.
Nawrin added a reviewer: tlwilmar.
Nawrin added a project: OpenMP.
Nawrin requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

This patch sets the default KMP_BLOCKTIME to 0 for hybrid CPUs. For hybrid CPU, setting default blocktime to 0 provides better performance in some large benchmarks (OMP2012, CPU2017). More investigation regarding impact on performance is on-going.

  rG LLVM Github Monorepo



Index: openmp/runtime/src/kmp.h
--- openmp/runtime/src/kmp.h
+++ openmp/runtime/src/kmp.h
@@ -1081,7 +1081,9 @@
 #define KMP_MIN_BLOCKTIME (0)
 #define KMP_MAX_BLOCKTIME                                                      \
   (INT_MAX) /* Must be this for "infinite" setting the work */
-#define KMP_DEFAULT_BLOCKTIME (200) /*  __kmp_blocktime is in milliseconds  */
+/* __kmp_blocktime is in milliseconds */
+#define KMP_DEFAULT_BLOCKTIME (__kmp_is_hybrid_cpu() ? (0) : (200))
 #define KMP_DEFAULT_MONITOR_STKSIZE ((size_t)(64 * 1024))

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113012.384061.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211102/0ba1ed76/attachment-0001.bin>

More information about the Openmp-commits mailing list