[polly] r274598 - GPURuntime: Only print status in debug mode

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


Author: grosser
Date: Tue Jul  5 22:04:53 2016
New Revision: 274598

URL: http://llvm.org/viewvc/llvm-project?rev=274598&view=rev
Log:
GPURuntime: Only print status in debug mode

This change moves all status messages that are printed in non-error mode behind
the POLLY_DEBUG flag.

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

Modified: polly/trunk/tools/GPURuntime/GPUJIT.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/tools/GPURuntime/GPUJIT.c?rev=274598&r1=274597&r2=274598&view=diff
==============================================================================
--- polly/trunk/tools/GPURuntime/GPUJIT.c (original)
+++ polly/trunk/tools/GPURuntime/GPUJIT.c Tue Jul  5 22:04:53 2016
@@ -290,7 +290,7 @@ void polly_initDevice(PollyGPUContext **
   /* Get compute capabilities and the device name. */
   CuDeviceComputeCapabilityFcnPtr(&Major, &Minor, (*Device)->Cuda);
   CuDeviceGetNameFcnPtr(DeviceName, 256, (*Device)->Cuda);
-  fprintf(stderr, "> Running on GPU device %d : %s.\n", DeviceID, DeviceName);
+  debug_print("> Running on GPU device %d : %s.\n", DeviceID, DeviceName);
 
   /* Create context on the device. */
   *Context = malloc(sizeof(PollyGPUContext));
@@ -369,7 +369,7 @@ void polly_stopTimerByCudaEvent(PollyGPU
   CudaEventElapsedTimeFcnPtr(ElapsedTimes, Start->Cuda, Stop->Cuda);
   CudaEventDestroyFcnPtr(Start->Cuda);
   CudaEventDestroyFcnPtr(Stop->Cuda);
-  fprintf(stderr, "Processing time: %f (ms).\n", *ElapsedTimes);
+  debug_print("Processing time: %f (ms).\n", *ElapsedTimes);
 
   free(Start);
   free(Stop);
@@ -415,7 +415,7 @@ void polly_launchKernel(PollyGPUFunction
     exit(-1);
   }
   CudaThreadSynchronizeFcnPtr();
-  fprintf(stdout, "CUDA kernel launched.\n");
+  debug_print("CUDA kernel launched.\n");
 }
 
 void polly_cleanupGPGPUResources(void *HostData, PollyGPUDevicePtr *DevData,




More information about the llvm-commits mailing list