[Openmp-commits] [PATCH] D86307: [OpenMP] Pack first-private arguments to improve efficiency of data transfer

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 20 19:24:50 PDT 2020


JonChesterfield added inline comments.


================
Comment at: openmp/libomptarget/src/omptarget.cpp:1017
+       FirstPrivateArgSize, DPxPTR(TgtPtr));
+    // Transfer data to target device. We use synchronous version here in case
+    // the host buffer is deallocated before the transfer is finished.
----------------
This seems target specific. Multiple async copies can easily be cheaper than one larger sync copy.

How is the lifetime of the host buffer usually managed for async copies?  It seems that keeping it alive until the async copy is done would be reasonable, or we could move ownership of the host buffer into the target plugin which is then responsible for the cleanup.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86307



More information about the Openmp-commits mailing list