[Openmp-commits] [openmp] r348148 - [OpenMP][libomptarget] Flush intermediate values during team reduction
Gheorghe-Teodor Bercea via Openmp-commits
openmp-commits at lists.llvm.org
Mon Dec 3 07:21:50 PST 2018
Author: gbercea
Date: Mon Dec 3 07:21:49 2018
New Revision: 348148
URL: http://llvm.org/viewvc/llvm-project?rev=348148&view=rev
Log:
[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
Modified:
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/reduction.cu
Modified: openmp/trunk/libomptarget/deviceRTLs/nvptx/src/reduction.cu
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/deviceRTLs/nvptx/src/reduction.cu?rev=348148&r1=348147&r2=348148&view=diff
==============================================================================
--- openmp/trunk/libomptarget/deviceRTLs/nvptx/src/reduction.cu (original)
+++ openmp/trunk/libomptarget/deviceRTLs/nvptx/src/reduction.cu Mon Dec 3 07:21:49 2018
@@ -444,6 +444,7 @@ EXTERN int32_t __kmpc_nvptx_teams_reduce
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);
}
More information about the Openmp-commits
mailing list