Altera_Forum
Honored Contributor
11 years agoKernel Launch Overhead
Hi everyone,
I am currently trying to measure and minimize the kernel launch overhead, because the kernels that I wrote have to be launched repeatedly. I am wondering which of the following way is the most accurate way of measuring kernel launch overhead: 1. Use the Kernel Execution tab of the profiler report and measure the "blank space" between each kernel launch. 2. Call clGetEventProfilingInfo() in host and calculate CL_PROFILING_COMMAND_START - CL_PROFILING_COMMAND_QUEUED 3. Call clock_gettime() in host to get wall-clock time between enquening kernel launches and clFinish, and then subtract the time of CL_PROFILING_COMMAND_START - CL_PROFILING_COMMAND_END from it. Also, I am wondering if launch overhead dependents on how the kernel is written? In some case, I applied SIMD during kernel compilation, and profile report seems to indicate that while the kernel execution time is reduced, the launch overhead is also increased, which offsets the increase in performance that I expected to get.