[Openmp-commits] [PATCH] D110707: [OpenMP][OMPT] lightweight tasks and explicit tasks
Vladimir Inđić via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Sep 29 05:58:37 PDT 2021
vladaindjic created this revision.
vladaindjic added reviewers: protze.joachim, AndreyChurbanov, hbae, jlpeyton.
Herald added subscribers: guansong, yaxunl.
vladaindjic requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
__ompt_get_task_info_internal function was extended to support arbitrary
nesting of explicit tasks and serialized parallel regions. In
particular, this fixes problems that occur when a serialized parallel
region is nested inside an explicit task which is at the same time
enclosed by another serialized parallel region.
While forming a serialized parallel region nested inside an explicit task,
a new lightweight task descriptor is created to represent the information
about the explicit task. To indicate whether a lightweight task descriptor
corresponds to an explicit or an implicit task, it now contains td_flags field
of kmp_tasking_flags_t type. Now, the ompt_get_task_info can determine
the right information about the task type.
When a serialized parallel region R2 <https://reviews.llvm.org/source/clang-tools-extra/> is nested inside a chain of explicit tasks
belonging to an enclosing serialized parallel region R1 <https://reviews.llvm.org/diffusion/L/>, all explicit tasks nested
in R1 <https://reviews.llvm.org/diffusion/L/> and R1 <https://reviews.llvm.org/diffusion/L/>’s implicit task share the same ompt_team_info stored inside the lwt
that represents the innermost explicit task in R1 <https://reviews.llvm.org/diffusion/L/>. (before nested loop)
The following tests are provided to show that the patch fixes described problems:
1. lwts_info.c - contains serialized parallel region that encloses an explicit task that encloses another serialized parallel region.
2. lwts_if_info.c - the same as previous with the difference that if(0) clause is used inside omp parallel and task directives
3. nested_lwts_info.c - contains three nested serialized parallel regions that enclose three explicit tasks that enclose another three nested serialized parallel regions.
4. nested_lwts_if0_info.c - the same as previous with the difference that if(0) clause is used inside omp parallel and task directives
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 51544 bytes
Desc: not available
More information about the Openmp-commits