[Openmp-commits] [PATCH] D144436: [libomptarget] Remove unused image from global data movement function

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Feb 21 05:09:55 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG22d618f543cb: [libomptarget] Remove unused image from global data movement function (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144436

Files:
  openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp
  openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.h


Index: openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.h
===================================================================
--- openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.h
+++ openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.h
@@ -112,7 +112,6 @@
   /// Actually move memory between host and device. See readGlobalFromDevice and
   /// writeGlobalToDevice for the interface description.
   Error moveGlobalBetweenDeviceAndHost(GenericDeviceTy &Device,
-                                       DeviceImageTy &Image,
                                        const GlobalTy &HostGlobal,
                                        const GlobalTy &DeviceGlobal,
                                        bool Device2Host);
@@ -140,11 +139,10 @@
   /// Copy the memory associated with a global from the device to its
   /// counterpart on the host. The name, size, and destination are defined by
   /// \p HostGlobal. The origin is defined by \p DeviceGlobal.
-  Error readGlobalFromDevice(GenericDeviceTy &Device, DeviceImageTy &Image,
+  Error readGlobalFromDevice(GenericDeviceTy &Device,
                              const GlobalTy &HostGlobal,
                              const GlobalTy &DeviceGlobal) {
-    return moveGlobalBetweenDeviceAndHost(Device, Image, HostGlobal,
-                                          DeviceGlobal,
+    return moveGlobalBetweenDeviceAndHost(Device, HostGlobal, DeviceGlobal,
                                           /* D2H */ true);
   }
 
@@ -163,8 +161,7 @@
   Error writeGlobalToDevice(GenericDeviceTy &Device, DeviceImageTy &Image,
                             const GlobalTy &HostGlobal,
                             const GlobalTy &DeviceGlobal) {
-    return moveGlobalBetweenDeviceAndHost(Device, Image, HostGlobal,
-                                          DeviceGlobal,
+    return moveGlobalBetweenDeviceAndHost(Device, HostGlobal, DeviceGlobal,
                                           /* D2H */ false);
   }
 
Index: openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp
===================================================================
--- openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp
+++ openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp
@@ -73,16 +73,15 @@
     return Err;
 
   // Perform the actual transfer.
-  return moveGlobalBetweenDeviceAndHost(Device, Image, HostGlobal, DeviceGlobal,
+  return moveGlobalBetweenDeviceAndHost(Device, HostGlobal, DeviceGlobal,
                                         Device2Host);
 }
 
 /// Actually move memory between host and device. See readGlobalFromDevice and
 /// writeGlobalToDevice for the interface description.
 Error GenericGlobalHandlerTy::moveGlobalBetweenDeviceAndHost(
-    GenericDeviceTy &Device, DeviceImageTy &DeviceImage,
-    const GlobalTy &HostGlobal, const GlobalTy &DeviceGlobal,
-    bool Device2Host) {
+    GenericDeviceTy &Device, const GlobalTy &HostGlobal,
+    const GlobalTy &DeviceGlobal, bool Device2Host) {
 
   // Transfer the data from the source to the destination.
   if (Device2Host) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144436.499118.patch
Type: text/x-patch
Size: 3184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230221/295717de/attachment-0001.bin>


More information about the Openmp-commits mailing list