[Openmp-commits] [PATCH] D132005: Add non-blocking support for target nowait regions

Guilherme Valarini via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 26 09:41:51 PDT 2022


gValarini added a comment.

First of all, sorry for the late reply.

In D132005#3730969 <https://reviews.llvm.org/D132005#3730969>, @ye-luo wrote:

> My second thought on this is let us do Stream sync for now.
> NVIDIA. If we sync with an event and return streams, tasks may got serialized if two happens in the same stream.
> AMD, at the hsa level, there is only signals(events).
> Level0, it depends on which type of commandlist being used.
> So it seems at libomptarget, it should be flexible and let the plugin decide which mechanism to use.

Ok, we can leave it as is for now. Just a comment on the NVIDIA case for future development: although we may not completely avoid the serialization problem using the pool of streams, I believe we can reduce it if the pool access pattern is changed. Currently, streams are acquired/released from/to the pool in a stack-like manner, which induces the frequent re-use of the streams nearest to the top of the stack/pool (in the code, the streams near the beginning of the `Resources` vector). By changing this access pattern to be round-robin-like, the stream use frequency may be evened over the pool and serialization becomes less of a problem.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132005



More information about the Openmp-commits mailing list