diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-08-29 17:35:09 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-08-29 17:35:09 +0000 |
commit | 4ae92ac4ef3db2921638a824d9f0ee220732da64 (patch) | |
tree | a1a41ab059b10df6f04066e16306baf2a8a4dd3d /libomptarget/deviceRTLs/nvptx/src/sync.cu | |
parent | 3e1e7c423b7b2dfb4fc047db18192d3ba48244be (diff) |
[OPENMP][NVPTX] Lightweight runtime support for SPMD mode.
Summary:
Implemented simple and lightweight runtime support for SPMD mode-based
constructs. It adds support for L2 sequential parallelism wihtout full
runtime support. Also, patch fixes some use cases for
uninitialized|lightweight runtime.
Reviewers: grokos, kkwli0, Hahnfeld, gtbercea
Subscribers: guansong, openmp-commits
Differential Revision: https://reviews.llvm.org/D51222
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@340944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'libomptarget/deviceRTLs/nvptx/src/sync.cu')
-rw-r--r-- | libomptarget/deviceRTLs/nvptx/src/sync.cu | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libomptarget/deviceRTLs/nvptx/src/sync.cu b/libomptarget/deviceRTLs/nvptx/src/sync.cu index 7e55df8..ba11f62 100644 --- a/libomptarget/deviceRTLs/nvptx/src/sync.cu +++ b/libomptarget/deviceRTLs/nvptx/src/sync.cu @@ -42,10 +42,8 @@ EXTERN int32_t __kmpc_cancel_barrier(kmp_Indent *loc_ref, int32_t tid) { EXTERN void __kmpc_barrier(kmp_Indent *loc_ref, int32_t tid) { if (isRuntimeUninitialized()) { - if (isSPMDMode()) - __kmpc_barrier_simple_spmd(loc_ref, tid); - else - __kmpc_barrier_simple_generic(loc_ref, tid); + assert(isSPMDMode() && "Expected SPMD mode with uninitialized runtime."); + __kmpc_barrier_simple_spmd(loc_ref, tid); } else { tid = GetLogicalThreadIdInBlock(); omptarget_nvptx_TaskDescr *currTaskDescr = |