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.
Likely causes:
HTH, Pete