Skip to content

Commit e8d2057

Browse files
authored
[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.
1 parent 95eb3d4 commit e8d2057

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

offload/DeviceRTL/src/Synchronization.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,10 @@ void setLock(omp_lock_t *Lock) {
398398
} // wait for 0 to be the read value
399399
}
400400

401+
void unsetCriticalLock(omp_lock_t *Lock) { unsetLock(Lock); }
402+
403+
void setCriticalLock(omp_lock_t *Lock) { setLock(Lock); }
404+
401405
#pragma omp end declare variant
402406
///}
403407

0 commit comments

Comments
 (0)