OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

How does Code Builder measures time ?

Marc_M_
Beginner
134 Views

Hi everyone,

I'm willing to know how exactly the Intel Code Builder tool measures time through execution, is there any documentation on this ? I can't find any.

Thanks !

 

0 Kudos
2 Replies
Arik_Z_Intel1
Employee
134 Views

Hi Marc,

In Code Builder we give 4 execution times:

1. Total - measured by calculating the host time (machine time) before the clEnqueueNDRangeKernel and after the clFinish.

2. Queue - measured by querying the clEvent object we get from clEnqueueNDRangeKernel for CL_PROFILING_COMMAND_QUEUED, CL_PROFILING_COMMAND_SUBMIT and calculating the difference

3. Submit - measured by querying the clEvent object we get from clEnqueueNDRangeKernel for CL_PROFILING_COMMAND_SUBMIT, CL_PROFILING_COMMAND_START and calculating the difference

4. Run - measured by querying the clEvent object we get from clEnqueueNDRangeKernel for CL_PROFILING_COMMAND_START, CL_PROFILING_COMMAND_END and calculating the difference

we do that for every iteration and for every configuration we run and then calculate the average, median, minimum, maximum and standard deviation.

I don't think the time measuring method is documented anywhere, do you think we should do it?

Marc_M_
Beginner
134 Views

Hi ARIK Z.,

Thank you for your answer, in fact what I wanted to know was an idea about the hardware/software mechanism by which the time is measured and retrieved.

I've read the whole documentation about Code Builder and I think it could be a good idea to explain briefly how the measurements are done. Because yes we have time measurements but we don't know how they are done by Intel's implementation.

Reply