[Openmp-commits] [PATCH] D141979: [OpenMP] Fix inconsistent task state if hot team is not used
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 18 15:22:17 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa4f246a83e3d: [OpenMP] Fix inconsistent task state if hot team is not used (authored by tianshilei1992).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141979/new/
https://reviews.llvm.org/D141979
Files:
openmp/runtime/src/kmp_runtime.cpp
Index: openmp/runtime/src/kmp_runtime.cpp
===================================================================
--- openmp/runtime/src/kmp_runtime.cpp
+++ openmp/runtime/src/kmp_runtime.cpp
@@ -2673,6 +2673,12 @@
master_th->th.th_task_state =
master_th->th
.th_task_state_memo_stack[master_th->th.th_task_state_top];
+ } else if (team != root->r.r_hot_team) {
+ // Reset the task state of primary thread if we are not hot team because
+ // in this case all the worker threads will be free, and their task state
+ // will be reset. If not reset the primary's, the task state will be
+ // inconsistent.
+ master_th->th.th_task_state = 0;
}
// Copy the task team from the parent team to the primary thread
master_th->th.th_task_team =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141979.490315.patch
Type: text/x-patch
Size: 806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230118/4921fe40/attachment.bin>
More information about the Openmp-commits
mailing list