diff options
author | Gheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com> | 2018-12-03 15:21:49 +0000 |
---|---|---|
committer | Gheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com> | 2018-12-03 15:21:49 +0000 |
commit | 71a315102d559da747dcd3bce96960909e80ec8f (patch) | |
tree | 377ac9c93c8c5c598989e72119d5ea765e2a8834 /libomptarget/deviceRTLs | |
parent | b0a4d9c9aa6dd6b561b25d28a5f9cfe9d039aac5 (diff) |
[OpenMP][libomptarget] Flush intermediate values during team reduction
Summary: Ensure intermediate values of a team reduction are flushed to memory.
Reviewers: ABataev, caomhin
Reviewed By: ABataev
Subscribers: guansong, jfb, openmp-commits
Differential Revision: https://reviews.llvm.org/D55219
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@348148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'libomptarget/deviceRTLs')
-rw-r--r-- | libomptarget/deviceRTLs/nvptx/src/reduction.cu | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libomptarget/deviceRTLs/nvptx/src/reduction.cu b/libomptarget/deviceRTLs/nvptx/src/reduction.cu index bbe4ad1..a9e35a1 100644 --- a/libomptarget/deviceRTLs/nvptx/src/reduction.cu +++ b/libomptarget/deviceRTLs/nvptx/src/reduction.cu @@ -444,6 +444,7 @@ EXTERN int32_t __kmpc_nvptx_teams_reduce_nowait_simple(kmp_Ident *loc, EXTERN void __kmpc_nvptx_teams_end_reduce_nowait_simple(kmp_Ident *loc, int32_t global_tid, kmp_CriticalName *crit) { + __threadfence_system(); (void)atomicExch((uint32_t *)crit, 0); } |