[Openmp-commits] [openmp] 7b9844c - [OpenMP][FIX] Explicit barriers in SPMD mode are not aligned

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 31 23:11:45 PST 2022


Author: Johannes Doerfert
Date: 2022-02-01T01:10:52-06:00
New Revision: 7b9844cc8dd0045f5251450ba2980d6d6ac48ef9

URL: https://github.com/llvm/llvm-project/commit/7b9844cc8dd0045f5251450ba2980d6d6ac48ef9
DIFF: https://github.com/llvm/llvm-project/commit/7b9844cc8dd0045f5251450ba2980d6d6ac48ef9.diff

LOG: [OpenMP][FIX] Explicit barriers in SPMD mode are not aligned

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.

Added: 
    

Modified: 
    openmp/libomptarget/DeviceRTL/src/Synchronization.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/DeviceRTL/src/Synchronization.cpp b/openmp/libomptarget/DeviceRTL/src/Synchronization.cpp
index 6b4bab0bcbb20..2deee6dfc2e9a 100644
--- a/openmp/libomptarget/DeviceRTL/src/Synchronization.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Synchronization.cpp
@@ -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();
 }
 


        


More information about the Openmp-commits mailing list