[Openmp-commits] [PATCH] D55219: [OpenMP][libomptarget] Flush intermediate values during team reduction

Gheorghe-Teodor Bercea via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 3 07:16:12 PST 2018


gtbercea created this revision.
gtbercea added reviewers: ABataev, caomhin.
Herald added subscribers: openmp-commits, jfb, guansong.

Ensure intermediate values of a team reduction are flushed to memory.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D55219

Files:
  libomptarget/deviceRTLs/nvptx/src/reduction.cu


Index: libomptarget/deviceRTLs/nvptx/src/reduction.cu
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/reduction.cu
+++ libomptarget/deviceRTLs/nvptx/src/reduction.cu
@@ -444,6 +444,7 @@
 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);
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55219.176397.patch
Type: text/x-patch
Size: 483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20181203/a8408895/attachment.bin>


More information about the Openmp-commits mailing list