[polly] r274597 - GPURuntime: Drop polly_allocateMemoryForHostAndDevice

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 5 20:04:51 PDT 2016


Author: grosser
Date: Tue Jul  5 22:04:50 2016
New Revision: 274597

URL: http://llvm.org/viewvc/llvm-project?rev=274597&view=rev
Log:
GPURuntime: Drop polly_allocateMemoryForHostAndDevice

There is function is currently unused and will be replaced in the future by
functions that allow to allocate memory only on the host or only on the device.

Modified:
    polly/trunk/tools/GPURuntime/GPUJIT.c
    polly/trunk/tools/GPURuntime/GPUJIT.h

Modified: polly/trunk/tools/GPURuntime/GPUJIT.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/tools/GPURuntime/GPUJIT.c?rev=274597&r1=274596&r2=274597&view=diff
==============================================================================
--- polly/trunk/tools/GPURuntime/GPUJIT.c (original)
+++ polly/trunk/tools/GPURuntime/GPUJIT.c Tue Jul  5 22:04:50 2016
@@ -375,24 +375,6 @@ void polly_stopTimerByCudaEvent(PollyGPU
   free(Stop);
 }
 
-void polly_allocateMemoryForHostAndDevice(void **HostData,
-                                          PollyGPUDevicePtr **DevData,
-                                          int MemSize) {
-  dump_function();
-
-  if ((*HostData = (int *)malloc(MemSize)) == 0) {
-    fprintf(stdout, "Could not allocate host memory.\n");
-    exit(-1);
-  }
-
-  *DevData = malloc(sizeof(PollyGPUDevicePtr));
-  if (*DevData == 0) {
-    fprintf(stdout, "Allocate memory for GPU device memory pointer failed.\n");
-    exit(-1);
-  }
-  CuMemAllocFcnPtr(&((*DevData)->Cuda), MemSize);
-}
-
 void polly_copyFromHostToDevice(PollyGPUDevicePtr *DevData, void *HostData,
                                 int MemSize) {
   dump_function();

Modified: polly/trunk/tools/GPURuntime/GPUJIT.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/tools/GPURuntime/GPUJIT.h?rev=274597&r1=274596&r2=274597&view=diff
==============================================================================
--- polly/trunk/tools/GPURuntime/GPUJIT.h (original)
+++ polly/trunk/tools/GPURuntime/GPUJIT.h Tue Jul  5 22:04:50 2016
@@ -63,7 +63,6 @@
  *   polly_initDevice(&Context, &Device);
  *   polly_getPTXModule(KernelString, &Module);
  *   polly_getPTXKernelEntry(Entry, Module, &Kernel);
- *   polly_allocateMemoryForHostAndDevice(&HostData, &DevData, MemSize);
  *   polly_setKernelParameters(Kernel, BlockWidth, BlockHeight, DevData);
  *   polly_startTimerByCudaEvent(&Start, &Stop);
  *   polly_launchKernel(Kernel, GridWidth, GridHeight);
@@ -92,9 +91,6 @@ void polly_copyFromHostToDevice(PollyGPU
                                 int MemSize);
 void polly_copyFromDeviceToHost(void *HostData, PollyGPUDevicePtr *DevData,
                                 int MemSize);
-void polly_allocateMemoryForHostAndDevice(void **HostData,
-                                          PollyGPUDevicePtr **DevData,
-                                          int MemSize);
 void polly_setKernelParameters(PollyGPUFunction *Kernel, int BlockWidth,
                                int BlockHeight, PollyGPUDevicePtr *DevData);
 void polly_launchKernel(PollyGPUFunction *Kernel, int GridWidth,




More information about the llvm-commits mailing list