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

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 11 14:56:48 PST 2021


jdoerfert added a comment.

@tianshilei1992 would you mind taking over the patch?



================
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)
+
----------------
tianshilei1992 wrote:
> 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.
I would prefer a dynamic one yes. potentially even one per warp. The elements would be `WarpStateTy` which is `WARP_SIZE*ThreadStateTy`.




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