[Openmp-commits] [PATCH] D96438: [OpenMP] Move synchronization into `__tgt_async_info`

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Feb 16 11:26:42 PST 2021


tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/src/omptarget.cpp:647
+  if (AsyncInfo) {
+    Ret = AsyncInfo->synchronize();
     if (Ret != OFFLOAD_SUCCESS)
----------------
This will cause `synchronize` to be called twice: one here, and another when `AsyncInfo` is destroyed. For now `__tgt_rtl_synchronize` is not designed to be called on a same object twice because it will `assert(async_info_ptr->Queue)`, and every time we call `synchronize`, `Queue` will be set to `nullptr`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96438



More information about the Openmp-commits mailing list