title: Nvidia's nvprof outputs for FLOPS
body: <p>I see that nvprof can profile the number of flop in the kernel (using the parameters as below). Also when I browse through the documentation (here <a href="http://docs.nvidia.com/cuda" rel="noreferrer">http://docs.nvidia.com/cuda</a>... it says flop_count_sp is "Number of single-precision floating-point operations executed by non-predicated threads (add, multiply, multiply-accumulate and special). Each multiply-accumulate operation contributes 2 to the count."</p>
  
  <p>However when I run, the result of <code>flop_count_sp</code> (which is supposed to be <code>flop_count_sp_add</code> + <code>flop_count_sp_mul</code> + <code>flop_count_sp_special</code> + <code>2 * flop_count_sp_fma</code>) I find that it does not include in the summation the value of <code>flop_count_sp_special</code>.</p>
  
  <p>Could you suggest me what I am supposed to use? Should I add this value to the sum of <code>flop_count_sp</code> or I should consider the formula does not include the value of <code>flop_count_sp_special</code>?</p>
  
  <p>Also could you please tell me what are these special operations?</p>
  
  <p>I'm using the following command line:</p>
  
  <pre><code>nvprof --metrics flops_sp --metrics flops_sp_add --metrics flops_sp_mul --metrics flops_sp_fma --metrics flops_sp_special myKernel args
  </code></pre>
  
  <p>Where <code>myKernel</code> is the name of my CUDA kernel which has some input arguments given by args.</p>
  
  <p>A section of my nvprof outputs for instance is as shown below:</p>
  
  <pre><code> ==20549== Profiling result:
   ==20549== Metric result:
   Invocations                               Metric Name                        Metric Description         Min         Max         Avg
   Device "Tesla K40c (0)"
      Kernel: mykernel(float*, int, int, float*, int, float*, int*)
             2                             flop_count_sp  Floating Point Operations(Single Precisi       70888       70888       70888
             2                         flop_count_sp_add  Floating Point Operations(Single Precisi       14465       14465       14465
             2                         flop_count_sp_mul  Floating Point Operation(Single Precisio       14465       14465       14465
             2                         flop_count_sp_fma  Floating Point Operations(Single Precisi       20979       20979       20979
             2                     flop_count_sp_special  Floating Point Operations(Single Precisi       87637       87637       87637
  </code></pre>