[Openmp-commits] [PATCH] D98349: [OpenMP][PoC][WIP] Device Rewrite, ICVs, ThreadState

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 11 12:48:40 PST 2021


tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/deviceRTLs/common/include/ThreadState.h:53
+extern ThreadStateTy *ThreadStates[MAX_THREADS_PER_TEAM];
+#pragma omp allocate(ThreadStates) allocator(omp_pteam_mem_alloc)
+
----------------
jdoerfert wrote:
> I think we want a per warp array as we can reasonably synchronize then. The first draft did not have a preallocated array at all but it is hard to create it properly at runtime if you have no idea what threads are running.
If we can get rid of static allocation here (basically the array) and use a dynamic one, it can help us a lot in terms of separating common part and target dependent part.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98349



More information about the Openmp-commits mailing list