[Openmp-commits] [PATCH] D55370: [OPENMP][NVPTX]Fix __kmpc_flush to flush the memory per system, not per block.

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 6 07:16:11 PST 2018


ABataev created this revision.
ABataev added reviewers: gtbercea, kkwli0.
Herald added subscribers: jfb, guansong.

According to the standard, after memory flushing the changes in the
memory must be visible to all the threads in all teams. Patch fixes
this.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D55370

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


Index: libomptarget/deviceRTLs/nvptx/src/sync.cu
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/sync.cu
+++ libomptarget/deviceRTLs/nvptx/src/sync.cu
@@ -132,7 +132,7 @@
 
 EXTERN void __kmpc_flush(kmp_Ident *loc) {
   PRINT0(LD_IO, "call kmpc_flush\n");
-  __threadfence_block();
+  __threadfence_system();
 }
 
 ////////////////////////////////////////////////////////////////////////////////


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55370.176969.patch
Type: text/x-patch
Size: 454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20181206/7d0525fd/attachment.bin>


More information about the Openmp-commits mailing list