From e8d2057ca48646a0d354051977298a76724cfaf3 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 26 Sep 2024 11:33:52 -0700 Subject: [PATCH] [OpenMP] Add critical region lock for NVPTX targets (#110148) Summary: We define this on AMDGCN but not NVPTX, which leads to some failures dependong on the target. --- offload/DeviceRTL/src/Synchronization.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/offload/DeviceRTL/src/Synchronization.cpp b/offload/DeviceRTL/src/Synchronization.cpp index d6452a5d589c59..9ea8d171cc830e 100644 --- a/offload/DeviceRTL/src/Synchronization.cpp +++ b/offload/DeviceRTL/src/Synchronization.cpp @@ -398,6 +398,10 @@ void setLock(omp_lock_t *Lock) { } // wait for 0 to be the read value } +void unsetCriticalLock(omp_lock_t *Lock) { unsetLock(Lock); } + +void setCriticalLock(omp_lock_t *Lock) { setLock(Lock); } + #pragma omp end declare variant ///}