[Openmp-commits] [PATCH] D107656: [OpenMP] Use events and taskyield in target nowait task to unblock host threads
Ye Luo via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sun Aug 8 10:36:34 PDT 2021
ye-luo added a comment.
> Thanks for pointing me to the link. The code convinced me even more, that taskyield is not the right solution even for your code example.
>
> I also think. that without ignoring the task scheduling constraint, your code will only be able to schedule one task from the taskloop during your taskyield and a nested taskyield cannot schedule a task:
> When you reach the taskyield, you have a tied task from the taskloop scheduled in the barrier of the single region (or in the taskgroup for the task executing the taskloop).
> The target task is untied and does not count, so you can schedule another task from the taskloop. Now, when you reach the taskyield, you have a tied task scheduled in the outer taskyield and none of the tasks from the taskloop can be scheduled.
> You might mitigate this limitation by adding untied to the taskloop, with the cost of untied tasks and run into the stack problem of taskyield.
I meant to have tasks untied and I should have marked the tasklop untied. But right now my taskloop iterations seems to behave like untied.
When I manually stepped in to libomp and I have seen the stack being build up by the taskyield. nvprof also confirms the stack being built up.
Again, building up the stack is not my concern. Usually the loop under taskloop only have < 5 iterations.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107656/new/
https://reviews.llvm.org/D107656
More information about the Openmp-commits
mailing list