[Openmp-commits] [PATCH] D143871: [OpenMP] Recover non-blocking target nowait disabled by D141232

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Feb 12 18:17:26 PST 2023


ye-luo created this revision.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
ye-luo requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143871

Files:
  openmp/libomptarget/src/interface.cpp


Index: openmp/libomptarget/src/interface.cpp
===================================================================
--- openmp/libomptarget/src/interface.cpp
+++ openmp/libomptarget/src/interface.cpp
@@ -299,8 +299,12 @@
                                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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143871.496819.patch
Type: text/x-patch
Size: 883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230213/c602cf2d/attachment.bin>


More information about the Openmp-commits mailing list