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

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jun 17 00:28:35 PDT 2021


JonChesterfield added a comment.

So is the race this is trying to fix between the host and the target, or between regions running on the target?

Passing data back to the host suggests the former, but that doesn't make sense, because the async operations are queued up within an async object that is not shared between host threads (and has a lexically scoped lifetime, iirc).

If it's a race between different target regions on the device, we should be able to resolve that with no host involvement at all.



================
Comment at: openmp/libomptarget/include/omptargetplugin.h:148
+// success, return zero. Otherwise, return an error code.
+int32_t __tgt_rtl_set_dependency(int32_t ID, __tgt_async_info *AsyncInfo);
+
----------------
tianshilei1992 wrote:
> JonChesterfield wrote:
> > 'barrier'? Not sure what dependency means here
> That's the interesting part. It is not a barrier. This operation is non-blocking, which means it just inserts the event to the queue, and that's it. So there is no wait.
So if it's not a barrier, what is it? What is this intended to do?


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