[Openmp-commits] [PATCH] D131782: [OpenMP][libomptarget] Fix run region async condition

Kevin Sala Penadés via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 12 08:07:35 PDT 2022


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

This patch fixes a condition in the openmp/libomptarget/src/device.cpp file. The code was checking if the run_region plugin API function was implemented, but it should actually check the run_region_async function instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131782

Files:
  openmp/libomptarget/src/device.cpp


Index: openmp/libomptarget/src/device.cpp
===================================================================
--- openmp/libomptarget/src/device.cpp
+++ openmp/libomptarget/src/device.cpp
@@ -580,7 +580,7 @@
 int32_t DeviceTy::runRegion(void *TgtEntryPtr, void **TgtVarsPtr,
                             ptrdiff_t *TgtOffsets, int32_t TgtVarsSize,
                             AsyncInfoTy &AsyncInfo) {
-  if (!RTL->run_region || !RTL->synchronize)
+  if (!RTL->run_region_async || !RTL->synchronize)
     return RTL->run_region(RTLDeviceID, TgtEntryPtr, TgtVarsPtr, TgtOffsets,
                            TgtVarsSize);
   return RTL->run_region_async(RTLDeviceID, TgtEntryPtr, TgtVarsPtr, TgtOffsets,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131782.452182.patch
Type: text/x-patch
Size: 703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220812/01565d8c/attachment.bin>


More information about the Openmp-commits mailing list