[Openmp-commits] [PATCH] D142247: Fix initialization of th_task_state on each thread on expanding hot teams.

Roger Ferrer Ibanez via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Feb 13 08:09:29 PST 2023


rogfer01 added a comment.

In D142247#4115990 <https://reviews.llvm.org/D142247#4115990>, @tlwilmar wrote:

> @rogfer01 th_task_state is used to refer to one of two task teams that are reused for each hot team. These two task teams exist because of a need to start using a new one while there may still be activity on the old task team, so we flip between the two.  Each thread has a th_task_state so it knows which task team is in use for a particular parallel region.  When a hot team is expanded in size for a larger parallel region, new threads added to the team need to have their th_task_state initialized to exactly what the other threads in the team are using, so that they are all in sync.  So instead, we just initialize from a thread that was in the team before the resize.

Thanks for the explanation @tlwilmar!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142247/new/

https://reviews.llvm.org/D142247



More information about the Openmp-commits mailing list