event profiling data on HD4000 always starts at 0

event profiling data on HD4000 always starts at 0

Ritratto di dominik.grewe

Hi,

I'm trying to profile my application using the clGetEventProfilingInfo(). Rather than just looking at the kernel execution time (CL_PROFILING_COMMAND_END - CL_PROFILING_COMMAND_START) I'd like to know the absolute value of when the kernels were executed, so I can draw a timeline. When using the CPU device this works just fine, but on the GPU device (HD4000) the timer seems to be reset every time.

I wrote a simple program that calls a kernel N times, each time followed by a call to clFinish. This is the information I get from the profiler

0 .. 15120 .. 11875440 .. 18972640
0 .. 6960 .. 917520 .. 7889600
0 .. 5760 .. 148800 .. 7247600
0 .. 5920 .. 159520 .. 7335520
0 .. 5840 .. 154000 .. 7310320
0 .. 5840 .. 199520 .. 7343760
0 .. 5920 .. 156640 .. 7296240
0 .. 6000 .. 148720 .. 7254880
0 .. 6080 .. 150240 .. 7294000
0 .. 6240 .. 149680 .. 7293920

The numbers are the return values of clGetEventProfilingInfo with CL_PROFILING_COMMAND_QUEUED, CL_PROFILING_COMMAND_SUBMIT, CL_PROFILING_COMMAND_START and CL_PROFILING_COMMAND_END, respectively.

As you can see the timer always starts at 0 again. It seems like each event has it's own counter that starts at 0 when the kernel is launched. Why is the behaviour on the GPU different to the behaviour on the CPU?

Dominik

2 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Raghu Muthyalampalli (Intel)

I'll take a look and get back to you on what's going on.

Thanks,
Raghu

Accedere per lasciare un commento.