[Openmp-commits] [PATCH] D94745: [OpenMP][WIP] Build the deviceRTLs with OpenMP instead of target dependent language - NOT FOR REVIEW
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jan 25 17:16:57 PST 2021
JonChesterfield added inline comments.
================
Comment at: openmp/libomptarget/deviceRTLs/common/omptarget.h:301
+extern DEVICE uint8_t parallelLevel[MAX_THREADS_PER_TEAM / WARPSIZE];
+#pragma omp allocate(parallelLevel) allocator(omp_pteam_mem_alloc)
+extern DEVICE uint16_t EXTERN_SHARED(threadLimit);
----------------
This will break on amdgpu, at least until the cmake for amdgpu changes over to openmp
If we spell it like:
```
#if _OPENMP
extern DEVICE uint8_t parallelLevel[MAX_THREADS_PER_TEAM / WARPSIZE];
#pragma omp allocate(parallelLevel) allocator(omp_pteam_mem_alloc)
#else
extern DEVICE
uint8_t EXTERN_SHARED(parallelLevel)[MAX_THREADS_PER_TEAM / WARPSIZE];
#endif
```
then amdgpu will continue working. Iirc this is the only shared array variable, the rest will be fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94745/new/
https://reviews.llvm.org/D94745
More information about the Openmp-commits
mailing list