[Openmp-commits] [PATCH] D99020: [OpenMP] Disable hidden helper task by default

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Mar 20 18:02:39 PDT 2021


tianshilei1992 added inline comments.


================
Comment at: openmp/runtime/src/kmp_runtime.cpp:8648
 kmp_info_t *__kmp_hidden_helper_main_thread;
 kmp_int32 __kmp_hidden_helper_threads_num = 8;
 std::atomic<kmp_int32> __kmp_unexecuted_hidden_helper_tasks;
----------------
ronlieb wrote:
> i tried this patch and found that i still needed to set  
>    LIBOMP_NUM_HIDDEN_HELPER_THREADS=0
> 
> would it make sense to set the default  to 0 instead of 8? 
> 
Yeah, that's a nice catch. It is this "hole" in `__kmp_threads` affecting the performance from my wild guess. I'll set it to 0 for now and fix it later. Thanks.


================
Comment at: openmp/runtime/src/kmp_settings.cpp:1224
+  // Set the number to 0 if hidden helper task is disabled
+  if (__kmp_enable_hidden_helper == FALSE) {
+    __kmp_hidden_helper_threads_num = 0;
----------------
ronlieb wrote:
> is this function called only when the environment variable is explicitly set in the environment?    
You're right.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99020



More information about the Openmp-commits mailing list