You are comparing GPU time (Brook+) to system time (CAL)? Are these two the same thing because they don't sound like it?
Originally posted by: ryta1203 You are comparing GPU time (Brook+) to system time (CAL)? Are these two the same thing because they don't sound like it?
I think they are the same. They are doing the same thing: transfer cpu->gpu, kernel execution, gpu->cpu.
The cal is:
The brook like:
Isn't there a CAL API call to get the timing of just the GPU? Why would they call one GPU Time and the other System Time?
Originally posted by: ryta1203 Isn't there a CAL API call to get the timing of just the GPU? Why would they call one GPU Time and the other System Time?
If you are looking into the cal code.
for (CALuint i = 0; i < Info.Iterations; ++i)
CopyDataToGPU(&ctx, resourceHandler, data, numInputs + numConstantBuffers);
if (!RunComputeProgram(&ctx, &module, Info.Height / bPartsNum , Info.Height / aPartsNum, &Info))
CopyDataFromGPU(&ctx, &resourceHandler[numInputs + numConstantBuffers], data + numInputs + numConstantBuffers, numOutputs);
RunComputeProgram will invoke follow:
if( calCtxRunProgramGrid(&event, *ctx, &pg) != CAL_RESULT_OK )
fprintf(stderr, "There was an error running the program.\n");
fprintf(stderr, "Error string is %s\n", calGetErrorString());
// Wait for the last run to complete.
while ( calCtxIsEventDone(*ctx, event) == CAL_RESULT_PENDING );
All the codes above are from the cal sdk samples.
The Kernel is the kernel exection timer, and System is the timer including the memory transfer. In the cal, you can get the kernel execution time. So there are kernel and system, two timer. In the brook, just one timer to show the total time, which should be the same of system time in the cal.