[OpenMP][FIX] Explicit barriers in SPMD mode are not aligned
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 26 Jan 2022 21:53:39 +0000 (15:53 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 1 Feb 2022 07:10:52 +0000 (01:10 -0600)
Due to num_threads (probably also other reasons) we cannot assume
explicit barriers are always executed by all threads in an aligned
fashion. We can optimize them if that property can be proven but
that is different.

openmp/libomptarget/DeviceRTL/src/Synchronization.cpp

index 6b4bab0..2deee6d 100644 (file)
@@ -336,9 +336,6 @@ void __kmpc_barrier(IdentTy *Loc, int32_t TId) {
   if (mapping::isMainThreadInGenericMode())
     return __kmpc_flush(Loc);
 
-  if (mapping::isSPMDMode())
-    return __kmpc_barrier_simple_spmd(Loc, TId);
-
   impl::namedBarrier();
 }