From 1081bb08cc509af820849d7c9ef62d8e84bfcde2 Mon Sep 17 00:00:00 2001 From: Kevin Sala Penads Date: Mon, 15 Aug 2022 13:07:27 -0400 Subject: [PATCH] [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 --- openmp/libomptarget/src/device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.7.4