[Openmp-commits] [openmp] 908ae84 - [OpenMP] Avoid assumptions at the end of a kernel

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 23 16:12:29 PDT 2023


Author: Johannes Doerfert
Date: 2023-08-23T16:11:43-07:00
New Revision: 908ae84351a3a3ddbaf08262f5387df01e7adba0

URL: https://github.com/llvm/llvm-project/commit/908ae84351a3a3ddbaf08262f5387df01e7adba0
DIFF: https://github.com/llvm/llvm-project/commit/908ae84351a3a3ddbaf08262f5387df01e7adba0.diff

LOG: [OpenMP] Avoid assumptions at the end of a kernel

When we used to treat the kernel end as as aligned barrier, assertions
at the end made sense. Now, they actually cause problems as the "writes"
are not ordered with regards to reads within the kernel. We can simply
get rid of them.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/DeviceRTL/src/Kernel.cpp b/openmp/libomptarget/DeviceRTL/src/Kernel.cpp
index 93a09972af1662..222983577164c6 100644
--- a/openmp/libomptarget/DeviceRTL/src/Kernel.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Kernel.cpp
@@ -135,7 +135,6 @@ int32_t __kmpc_target_init(KernelEnvironmentTy &KernelEnvironment) {
 ///
 void __kmpc_target_deinit() {
   bool IsSPMD = mapping::isSPMDMode();
-  state::assumeInitialState(IsSPMD);
   if (IsSPMD)
     return;
 


        


More information about the Openmp-commits mailing list