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 | 10b2e60b7e99dec7941758371a7684c324df22d6 (patch) | |
| tree | 80d7a3948759478e498d57ceb9833221b3d257bf | |
| parent | 1712bc7640033853d491228b589e7394ff77be2c (diff) | |
| download | bcm5719-llvm-10b2e60b7e99dec7941758371a7684c324df22d6.tar.gz bcm5719-llvm-10b2e60b7e99dec7941758371a7684c324df22d6.zip | |
[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
llvm-svn: 348148
| -rw-r--r-- | openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu index bbe4ad16838..a9e35a1b9fc 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu +++ b/openmp/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); } |

