From: Kevin Sala Penads Date: Mon, 15 Aug 2022 17:07:27 +0000 (-0400) Subject: [OpenMP][libomptarget] Fix run region async condition X-Git-Tag: upstream/17.0.6~36450 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1081bb08cc509af820849d7c9ef62d8e84bfcde2;p=platform%2Fupstream%2Fllvm.git [OpenMP][libomptarget] Fix run region async condition 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. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D131782 --- diff --git a/openmp/libomptarget/src/device.cpp b/openmp/libomptarget/src/device.cpp index ddcbdc4..29b5a6c 100644 --- a/openmp/libomptarget/src/device.cpp +++ b/openmp/libomptarget/src/device.cpp @@ -580,7 +580,7 @@ int32_t DeviceTy::dataExchange(void *SrcPtr, DeviceTy &DstDev, void *DstPtr, 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,