[Openmp-commits] [PATCH] D104418: [OpenMP][Offloading] Fixed data race in libomptarget caused by async data movement

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 20 09:24:54 PDT 2021


grokos added a comment.

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

> There is a performance hit from frequent creating/destroying events at very transfer. The create/destroy logic can be separate from recording events.

What an event is and how it is handled is plugin-specific. `createEvent` and `destroyEvent` can be implemented e.g. via a pool of events where an event will be picked upon `createEvent` and returned back to the pool upon `destroyEvent` (similar to what we do for streams in the CUDA plugin). So these performance considerations can be fixed in a subsequent patch. Right now there is a race condition - a correctness concern - that we should fix. At the very least, since the logic in the base library is correct and we pretty much agree on it, we should let this patch land without the CUDA plugin changes; then we can provide optimized implementations for the `__tgt_rtl_*_event` functions for the plugins we care about in future patches.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104418



More information about the Openmp-commits mailing list