diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-12-06 15:27:58 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-12-06 15:27:58 +0000 |
commit | c4192ee6304fc1e05d991aa46ed6ec0f44d37497 (patch) | |
tree | ecb96e36ad4ef8d36a07bfd7412067bd7bf52b26 /openmp | |
parent | 9cfcbfc12c1cf40dcfcd759a4e2e448c2c966575 (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
Diffstat (limited to 'openmp')
-rw-r--r-- | openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu index 082f3b302db..d4f2ada9604 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu +++ b/openmp/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(); } //////////////////////////////////////////////////////////////////////////////// |