[Openmp-commits] [PATCH] D107121: [OpenMP] Fix performance regression reported in bug #51235
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 3 20:10:35 PDT 2021
tianshilei1992 added a comment.
I didn't see an issue regarding the child task counter.
Increment:
if (flags->proxy == TASK_PROXY || flags->detachable == TASK_DETACHABLE ||
flags->hidden_helper ||
!(taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser)) {
KMP_ATOMIC_INC(&parent_task->td_incomplete_child_tasks);
...
Decrement:
if (!(taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser) ||
taskdata->td_flags.detachable == TASK_DETACHABLE ||
taskdata->td_flags.hidden_helper) {
__kmp_release_deps(gtid, taskdata);
// Predecrement simulated by "- 1" calculation
#if KMP_DEBUG
children = -1 +
#endif
KMP_ATOMIC_DEC(&taskdata->td_parent->td_incomplete_child_tasks);
...
Another increment of the counter is in `__kmp_task_dup_alloc`, which is for task loop, that is unrelated here. No other increment/decrement.
I did check the counter for the case `gtid`, and after the three tasks are created, the counter is 3, as expected.
https://bugs.llvm.org/show_bug.cgi?id=49816 also reports that one task is missing. So I'm thinking the issue is not introduced by this patch. Can you help double check if w/o the patch you can still observe the failure? If it is not introduced by this patch, I feel we could first get this patch in and then see if we can reproduce the issue in another way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107121/new/
https://reviews.llvm.org/D107121
More information about the Openmp-commits
mailing list