HomePhabricator

[OPENMP][NVPTX]Use __syncwarp() to reconverge the threads.

Authored by ABataev on Aug 23 2019, 11:34 AM.

Description

[OPENMP][NVPTX]Use __syncwarp() to reconverge the threads.

Summary:
In Cuda 9.0 it is not guaranteed that threads in the warps are
convergent. We need to use syncwarp() function to reconverge
the threads and to guarantee the memory ordering among threads in the
warps.
This is the first patch to fix the problem with the test
libomptarget/deviceRTLs/nvptx/src/sync.cu on Cuda9+.
This patch just replaces calls to
shfl_sync() function with the call
of __syncwarp() function where we need to reconverge the threads when we
try to modify the value of the parallel level counter.

Reviewers: grokos

Subscribers: guansong, jfb, jdoerfert, caomhin, kkwli0, openmp-commits

Tags: #openmp

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

llvm-svn: 369796

Details

Committed
ABataevAug 23 2019, 11:34 AM
Differential Revision
D65013: [OPENMP][NVPTX]Use __syncwarp() to reconverge the threads.
Parents
rG9cb059fdcc03: Fix a bug in just submitted rL369789
Branches
Unknown
Tags
Unknown