[Openmp-commits] [PATCH] D137225: [OpenMP][libomptarget] Fix AsyncInfoTy object in omp_target_memcpy

Kevin Sala Penadés via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 1 20:39:44 PDT 2022


kevinsala created this revision.
kevinsala added reviewers: jhuber6, tianshilei1992, jdoerfert, josemonsalve2.
kevinsala added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
kevinsala requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.

The AsyncInfoTy should be created in the same device as the async operation will be issued. In omp_target_memcpy, the AsyncInfoTy for the host to destination device transfer was created referring to the source device.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137225

Files:
  openmp/libomptarget/src/api.cpp


Index: openmp/libomptarget/src/api.cpp
===================================================================
--- openmp/libomptarget/src/api.cpp
+++ openmp/libomptarget/src/api.cpp
@@ -190,7 +190,7 @@
       Rc = SrcDev.retrieveData(Buffer, SrcAddr, Length, AsyncInfo);
     }
     if (Rc == OFFLOAD_SUCCESS) {
-      AsyncInfoTy AsyncInfo(SrcDev);
+      AsyncInfoTy AsyncInfo(DstDev);
       Rc = DstDev.submitData(DstAddr, Buffer, Length, AsyncInfo);
     }
     free(Buffer);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137225.472495.patch
Type: text/x-patch
Size: 478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221102/f3aa09a9/attachment.bin>


More information about the Openmp-commits mailing list