Performance measurements are done on a large number of invocations of the same routine. Since the first iteration is almost always significantly slower than the subsequent ones, the minimum (or average, geometric mean, etc) value for the execution time is usually used for final projections.
An alternative to calling the kernel many times is to use a single “warm-up” run.
The “warm-up” might be helpful for small/lightweight kernels. Specifically it helps to amortize the following potential (one-time) costs:
You need to build your performance conclusions on reproducible data. If
“warming” run does not help and/or execution time still varies, you can
try running large number of iterations and then average the results (for
time values that range too much, consider using
Consider the following:
Kernels that are very lightweight do not give reliable data, so making them artificially heavier could give you important insights into the hotspots. For example, you can add loop in the kernel, or replicate its heavy pieces.
Please refer to the “OpenCL* Optimizations Tutorial” SDK sample for code examples of performing “warm-up” activities before starting performance measurement. You can download the sample from the Intel® SDK for OpenCL* Applications division of the VCSource webportal.
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804