[Openmp-commits] [openmp] 0d4e55b - [OpenMP] Recover non-blocking target nowait disabled by D141232

Ye Luo via Openmp-commits openmp-commits at lists.llvm.org
Tue Feb 14 13:51:04 PST 2023


Author: Ye Luo
Date: 2023-02-14T15:48:38-06:00
New Revision: 0d4e55ba69c1dd04913c59d39c764c8070e55c60

URL: https://github.com/llvm/llvm-project/commit/0d4e55ba69c1dd04913c59d39c764c8070e55c60
DIFF: https://github.com/llvm/llvm-project/commit/0d4e55ba69c1dd04913c59d39c764c8070e55c60.diff

LOG: [OpenMP] Recover non-blocking target nowait disabled by D141232

Reviewed By: jdoerfert

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

Added: 
    

Modified: 
    openmp/libomptarget/src/interface.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/src/interface.cpp b/openmp/libomptarget/src/interface.cpp
index 91dda62b0c2d5..beea0c26210bc 100644
--- a/openmp/libomptarget/src/interface.cpp
+++ b/openmp/libomptarget/src/interface.cpp
@@ -299,8 +299,12 @@ EXTERN int __tgt_target_kernel(ident_t *Loc, int64_t DeviceId, int32_t NumTeams,
                                int32_t ThreadLimit, void *HostPtr,
                                KernelArgsTy *KernelArgs) {
   TIMESCOPE_WITH_IDENT(Loc);
-  return targetKernel<AsyncInfoTy>(Loc, DeviceId, NumTeams, ThreadLimit,
-                                   HostPtr, KernelArgs);
+  if (KernelArgs->Flags.NoWait)
+    return targetKernel<TaskAsyncInfoWrapperTy>(
+        Loc, DeviceId, NumTeams, ThreadLimit, HostPtr, KernelArgs);
+  else
+    return targetKernel<AsyncInfoTy>(Loc, DeviceId, NumTeams, ThreadLimit,
+                                     HostPtr, KernelArgs);
 }
 
 /// Implements a target kernel entry that replays a pre-recorded kernel.


        


More information about the Openmp-commits mailing list