title: Profile debug or release cuda code?
body: <p>I have been profiling an application with <code>nvprof and nvvp (5.5)</code> in order to optimize it. However, I get totally different results for some metrics/events like <code>inst_replay_overhead</code>, <code>ipc</code> or <code>branch_efficiency</code>, etc. when I'm profiling the debug (<code>-G</code>) and release version of the code.</p>
  
  <p><strong>so my question is:</strong> which version should I profile? The release or debug version? Or the choice depends upon what I'm looking for?</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/12370325/cuda-visual-profiler-and-control-flow-divergence">CUDA - Visual Profiler and Control Flow Divergence</a> where is stated that a debug (<code>-G</code>) version is needed to properly measure the divergent branches metric, but I am not sure about other metrics.</p>