[PATCH] D78075: [WIP][Clang][OpenMP] Added support for nowait target in CodeGen

Shilei Tian via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 16 10:53:02 PDT 2020


tianshilei1992 added a comment.

> If I remember correctly, you may yield the thread inside a target region after enqueuing kernels and transfers. So even with 1 thread, there is chance to run other tasks without finishing this target. Isn't that possible?

I assume you were referring to `taskyield` because thread yield doesn't make sense here. I don't think it can help. Where should we insert the task yield? What's more, yielding current task means "blocking" the encountering thread, so it has no difference from executing it immediately. Besides, we do synchronization at the end of wrapped task.

The only way to make things right w/o using unshackled task when we only have one regular OpenMP thread, or say user-visible thread, is to use detached task. However, like we talked in the paper, it has some drawbacks so that we decided to use unshackled tasks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78075



More information about the cfe-commits mailing list