This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Consistent Kernel Time

I'm trying to run an OpenCL kernel multiple times, in sequence. When doing this I cannot get a consistent timing between the first execution and every other execution of the kernel. Each time the kernel is run I reset the kernel arguments and call clEnqueueNDRangekernel() with a clFinish() call before and after.

What is causing the first run of the kernel to take significantly longer? I have timings of around 30 milliseconds for the first execution and 1-2 milliseconds for all other executions.

Parents
  • Likely causes:

    1. Your system is using DVFS frequency scaling, and it takes some time to ramp from a low frequency mode to a higher frequency mode.
    2. Your timing is including data upload and other setup for the first kernel executions, but not for the later executions.

    HTH,
    Pete

Reply
  • Likely causes:

    1. Your system is using DVFS frequency scaling, and it takes some time to ramp from a low frequency mode to a higher frequency mode.
    2. Your timing is including data upload and other setup for the first kernel executions, but not for the later executions.

    HTH,
    Pete

Children
No data