aboutsummaryrefslogtreecommitdiff
path: root/libomptarget
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-12-06 15:27:58 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-12-06 15:27:58 +0000
commit28c12c9c145a00d97703b949fc83a406183f8aed (patch)
tree5410e0f6afb2d3764b78459759e25a955680564e /libomptarget
parent71a315102d559da747dcd3bce96960909e80ec8f (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@348491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'libomptarget')
-rw-r--r--libomptarget/deviceRTLs/nvptx/src/sync.cu2
1 files changed, 1 insertions, 1 deletions
diff --git a/libomptarget/deviceRTLs/nvptx/src/sync.cu b/libomptarget/deviceRTLs/nvptx/src/sync.cu
index 082f3b3..d4f2ada 100644
--- a/libomptarget/deviceRTLs/nvptx/src/sync.cu
+++ b/libomptarget/deviceRTLs/nvptx/src/sync.cu
@@ -132,7 +132,7 @@ EXTERN void __kmpc_end_single(kmp_Ident *loc, int32_t global_tid) {
EXTERN void __kmpc_flush(kmp_Ident *loc) {
PRINT0(LD_IO, "call kmpc_flush\n");
- __threadfence_block();
+ __threadfence_system();
}
////////////////////////////////////////////////////////////////////////////////