Skip to content

[OpenMP] Add critical region lock for NVPTX targets #110148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Sep 26, 2024

Summary:
We define this on AMDGCN but not NVPTX, which leads to some failures
dependong on the target.

Summary:
We define this on AMDGCN but not NVPTX, which leads to some failures
dependong on the target.
@llvmbot
Copy link
Member

llvmbot commented Sep 26, 2024

@llvm/pr-subscribers-offload

Author: Joseph Huber (jhuber6)

Changes

Summary:
We define this on AMDGCN but not NVPTX, which leads to some failures
dependong on the target.


Full diff: https://github.com/llvm/llvm-project/pull/110148.diff

1 Files Affected:

  • (modified) offload/DeviceRTL/src/Synchronization.cpp (+4)
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
 ///}
 

@jhuber6 jhuber6 merged commit e8d2057 into llvm:main Sep 26, 2024
8 checks passed
Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Sep 27, 2024
Summary:
We define this on AMDGCN but not NVPTX, which leads to some failures
dependong on the target.
@jhuber6 jhuber6 deleted the lock branch October 14, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants