[Openmp-commits] [openmp] r348491 - [OPENMP][NVPTX]Fix __kmpc_flush to flush the memory per system, not per block.

Alexey Bataev via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 6 07:27:58 PST 2018


Author: abataev
Date: Thu Dec  6 07:27:58 2018
New Revision: 348491

URL: http://llvm.org/viewvc/llvm-project?rev=348491&view=rev
Log:
[OPENMP][NVPTX]Fix __kmpc_flush to flush the memory per system, not per block.

Summary:
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.

Reviewers: gtbercea, kkwli0

Subscribers: guansong, jfb, caomhin, openmp-commits

Differential Revision: https://reviews.llvm.org/D55370

Modified:
    openmp/trunk/libomptarget/deviceRTLs/nvptx/src/sync.cu

Modified: openmp/trunk/libomptarget/deviceRTLs/nvptx/src/sync.cu
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/deviceRTLs/nvptx/src/sync.cu?rev=348491&r1=348490&r2=348491&view=diff
==============================================================================
--- openmp/trunk/libomptarget/deviceRTLs/nvptx/src/sync.cu (original)
+++ openmp/trunk/libomptarget/deviceRTLs/nvptx/src/sync.cu Thu Dec  6 07:27:58 2018
@@ -132,7 +132,7 @@ EXTERN void __kmpc_end_single(kmp_Ident
 
 EXTERN void __kmpc_flush(kmp_Ident *loc) {
   PRINT0(LD_IO, "call kmpc_flush\n");
-  __threadfence_block();
+  __threadfence_system();
 }
 
 ////////////////////////////////////////////////////////////////////////////////




More information about the Openmp-commits mailing list