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

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 19 07:49:33 PDT 2020


AndreyChurbanov added inline comments.


================
Comment at: openmp/runtime/src/kmp.h:3954
+// Check whether a given thread is an unshackled thread
+#define KMP_UNSHACKLED_THREAD(gtid) ((gtid) >= __kmp_threads_capacity)
+// Map a gtid to an unshackled thread. The first unshackled thread, a.k.a master
----------------
I see the problem here:  threads array is expandable.
E.g. suppose the application starts with threads capacity=32, then threads 0-31 would be regular OMP threads, and threads 32-63 are unshackled threads.

Then after some execution the application can request the parallel region with 300 threads.  The threads array will be expanded, but what will happen with unshackled threads?


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