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

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 19 08:17:12 PDT 2020


tianshilei1992 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
----------------
AndreyChurbanov wrote:
> 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?
Right. That's a good point. I could take the first few elements for the unshackled team I guess.


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