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.

llvm-svn: 274598
This commit is contained in:
Tobias Grosser 2016-07-06 03:04:53 +00:00
parent 856e31bb9c
commit 91990ab3ac
1 changed files with 3 additions and 3 deletions

View File

@ -290,7 +290,7 @@ void polly_initDevice(PollyGPUContext **Context, PollyGPUDevice **Device) {
/* 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(PollyGPUEvent *Start, PollyGPUEvent *Stop,
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 *Kernel, int GridWidth,
exit(-1);
}
CudaThreadSynchronizeFcnPtr();
fprintf(stdout, "CUDA kernel launched.\n");
debug_print("CUDA kernel launched.\n");
}
void polly_cleanupGPGPUResources(void *HostData, PollyGPUDevicePtr *DevData,