[llvm] [OpenMP] Add critical region lock for NVPTX targets (PR #110148)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 10:42:07 PDT 2024
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/110148
Summary:
We define this on AMDGCN but not NVPTX, which leads to some failures
dependong on the target.
>From 7418942a29554b97913d08dd9b278b0deadb7eda Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Thu, 26 Sep 2024 12:41:02 -0500
Subject: [PATCH] [OpenMP] Add critical region lock for NVPTX targets
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
///}
More information about the llvm-commits
mailing list