[Openmp-commits] [PATCH] D77609: [OpenMP] Added the support for hidden helper task in RTL

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Mar 17 07:52:59 PDT 2021


protze.joachim added a comment.

@tianshilei1992 please review my comments, they might explain why the assertion triggers.



================
Comment at: openmp/runtime/src/kmp_runtime.cpp:3636
   /* see if there are too many threads */
   if (__kmp_all_nth >= capacity && !__kmp_expand_threads(1)) {
     if (__kmp_tp_cached) {
----------------
This check is not aware of reserved hidden threads. `__kmp_expand_threads` will only be called, if __kmp_all_nth exeeds the capacity limit. Even if the hidden threads are included in `__kmp_all_nth`, this check does not consider the hole in the thread array.


================
Comment at: openmp/runtime/src/kmp_runtime.cpp:3667
+    // initial thread. Slots for hidden helper threads should also be skipped.
+    if (initial_thread && __kmp_threads[0] == NULL) {
+      gtid = 0;
----------------
This load used to be TCR_PTR


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77609



More information about the Openmp-commits mailing list