[Openmp-commits] [PATCH] D105812: [libomptarget] Update device pointer only if needed

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 12 06:34:33 PDT 2021


grokos created this revision.
grokos added reviewers: RaviNarayanaswamy, jdenny, tianshilei1992, jdoerfert, JonChesterfield.
grokos added a project: OpenMP.
grokos requested review of this revision.
Herald added a subscriber: sstefan1.

Currently, libomptarget will always perform a host-to-device memory transfer in order to update the device pointer of a PTR_AND_OBJ entry. This is not always necessary because the device pointer may have been set to the correct pointee address already, so we can eliminate the redundant memory transfer.

The attached test is C code emulating what happens when mapping Fortran dope vectors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105812

Files:
  openmp/libomptarget/src/omptarget.cpp
  openmp/libomptarget/test/mapping/device_ptr_update.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105812.357927.patch
Type: text/x-patch
Size: 3331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210712/3ddad0e4/attachment-0001.bin>


More information about the Openmp-commits mailing list