[all-commits] [llvm/llvm-project] d83ca6: [OpenMP] Fix data-race in new device RTL
Joseph Huber via All-commits
all-commits at lists.llvm.org
Thu Sep 23 14:28:27 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d83ca624a1d52b600ddbd8bfcbb3d5d7c6003af7
https://github.com/llvm/llvm-project/commit/d83ca624a1d52b600ddbd8bfcbb3d5d7c6003af7
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2021-09-23 (Thu, 23 Sep 2021)
Changed paths:
M openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
Log Message:
-----------
[OpenMP] Fix data-race in new device RTL
This patch fixes a data-race observed when using the new device runtime
library. The Internal control variable for the parallel level is read in
the `__kmpc_parallel_51` function while it could potentially be written
by other threads. This causes data corruption and will cause
nondetermistic behaviour in the runtime. This patch fixes this by adding
an explicit synchronization before the region starts.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D110366
More information about the All-commits
mailing list