Skip to content

Commit

Permalink
[OPENMP][NVPTX]Fix __kmpc_flush to flush the memory per system, not p…
Browse files Browse the repository at this point in the history
…er 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

llvm-svn: 348491
  • Loading branch information
alexey-bataev committed Dec 6, 2018
1 parent f30c4ad commit 5442f3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu
Expand Up @@ -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();
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 5442f3e

Please sign in to comment.