[all-commits] [llvm/llvm-project] 41ca91: [OpenMP] Fix task state and taskteams for serial t...
Jonathan Peyton via All-commits
all-commits at lists.llvm.org
Tue May 7 06:42:13 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 41ca9104ac1e0bf248d4082f45c5ad03ddd55727
https://github.com/llvm/llvm-project/commit/41ca9104ac1e0bf248d4082f45c5ad03ddd55727
Author: Jonathan Peyton <jonathan.l.peyton at intel.com>
Date: 2024-05-07 (Tue, 07 May 2024)
Changed paths:
M openmp/runtime/src/kmp.h
M openmp/runtime/src/kmp_barrier.cpp
M openmp/runtime/src/kmp_csupport.cpp
M openmp/runtime/src/kmp_runtime.cpp
M openmp/runtime/src/kmp_tasking.cpp
A openmp/runtime/test/target/issue-81488.c
A openmp/runtime/test/tasking/issue-50602.c
A openmp/runtime/test/tasking/issue-69368.c
A openmp/runtime/test/tasking/issue-69733.c
A openmp/runtime/test/tasking/issue-79416.c
A openmp/runtime/test/tasking/task_teams_stress_test.cpp
Log Message:
-----------
[OpenMP] Fix task state and taskteams for serial teams (#86859)
* Serial teams now use a stack (similar to dispatch buffers)
* Serial teams always use `t_task_team[0]` as the task team and the
second pointer is a next pointer for the stack
`t_task_team[1]` is interpreted as a stack of task teams where each
level is a nested level
```
inner serial team outer serial team
[ t_task_team[0] ] -> (task_team) [ t_task_team[0] ] -> (task_team)
[ next ] ----------------> [ next ] -> ...
```
* Remove the task state memo stack from thread structure.
* Instead of a thread-private stack, use team structure to store
th_task_state of the primary thread. When coming out of a parallel,
restore the primary thread's task state. The new field in the team
structure doesn't cause sizeof(team) to change and is in the cache line
which is only read/written by the primary thread.
Fixes: #50602
Fixes: #69368
Fixes: #69733
Fixes: #79416
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list