title: How to calculate Gflops of a kernel
body: <p>I want a measure of how much of the peak performance my kernel archives.</p>
  <p>Say I have a NVIDIA Tesla C1060, which has a <a href="http://en.wikipedia.org/wiki/Nvidia_Tesla" rel="noreferrer">peak GFLOPS of 622.08</a> (~= 240Cores * 1300MHz * 2).
  Now in my kernel I counted for each thread 16000 flop (4000 x (2 subtraction, 1 multiplication and 1 sqrt)). So when I have 1,000,000 threads I would come up with 16GFLOP. And as the kernel takes 0.1 seconds I would archive 160GFLOPS, which would be a quarter of the peak performance. Now my questions:</p>
  <ul>
  <li>Is this approach correct?</li>
  <li>What about comparisons (<code>if(a&gt;b) then....</code>)? Do I have to consider them as well?</li>
  <li>Can I use the CUDA profiler for easier and more accurate results? I tried the <code>instructions</code> counter, but I could not figure out, what the figure means.</li>
  </ul>
  <p>sister question: <a href="https://stackoverflow.com/questions/7876006/how-to-calculate-the-achieved-bandwidth-of-a-cuda-kernel">How to calculate the achieved bandwidth of a CUDA kernel</a></p>