Skip to content

Commit e1947b8

Browse files
committed
Revert "[OPENMP][NVPTX]Fix barriers and parallel level counters, NFC."
This reverts commit r361421 to split the patch into 3 parts. llvm-svn: 361638
1 parent 21977d8 commit e1947b8

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ __device__ omptarget_nvptx_SimpleMemoryManager
3131
__device__ __shared__ uint32_t usedMemIdx;
3232
__device__ __shared__ uint32_t usedSlotIdx;
3333

34-
__device__ __shared__ volatile uint8_t
35-
parallelLevel[MAX_THREADS_PER_TEAM / WARPSIZE];
34+
__device__ __shared__ uint8_t parallelLevel[MAX_THREADS_PER_TEAM / WARPSIZE];
3635
__device__ __shared__ uint16_t threadLimit;
3736
__device__ __shared__ uint16_t threadsInTeam;
3837
__device__ __shared__ uint16_t nThreads;

openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ extern __device__ omptarget_nvptx_SimpleMemoryManager
398398
omptarget_nvptx_simpleMemoryManager;
399399
extern __device__ __shared__ uint32_t usedMemIdx;
400400
extern __device__ __shared__ uint32_t usedSlotIdx;
401-
extern __device__ __shared__ volatile uint8_t
401+
extern __device__ __shared__ uint8_t
402402
parallelLevel[MAX_THREADS_PER_TEAM / WARPSIZE];
403403
extern __device__ __shared__ uint16_t threadLimit;
404404
extern __device__ __shared__ uint16_t threadsInTeam;

openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ EXTERN void __kmpc_barrier(kmp_Ident *loc_ref, int32_t tid) {
6262
// Barrier #1 is for synchronization among active threads.
6363
named_sync(L1_BARRIER, threads);
6464
}
65-
} else {
66-
__kmpc_flush(loc_ref);
6765
} // numberOfActiveOMPThreads > 1
6866
PRINT0(LD_SYNC, "completed kmpc_barrier\n");
6967
}
@@ -132,7 +130,7 @@ EXTERN void __kmpc_end_single(kmp_Ident *loc, int32_t global_tid) {
132130

133131
EXTERN void __kmpc_flush(kmp_Ident *loc) {
134132
PRINT0(LD_IO, "call kmpc_flush\n");
135-
__threadfence();
133+
__threadfence_system();
136134
}
137135

138136
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)