title: Nvprof, metrics, the elapsed_cycles variable
body: <p>I'm having some issues with the CUDA <strong>nvprof</strong> profiler. Some of the metrics on the site are named differently than in the profiler, and the variables don't seem to be explained anywhere on the site, or for that matter anywhere on the web (I wasn't able to find any valid reference).</p>
  
  <p>I decoded most of those (here: <a href="https://stackoverflow.com/questions/15581265/calculating-gst-throughput-and-gld-throughput-with-nvprof">calculating gst_throughput and gld_throughput with nvprof</a>), but I'm still not sure about:</p>
  
  <pre><code>elapsed_cycles
  max_warps_per_sm
  </code></pre>
  
  <p>Anyone knows precisely how to count those? </p>
  
  <p>I'm trying to use the <strong>nvprof</strong> to assess some 6000 different kernels via cmdline, so it is not really viable for me to use the visual profiler.</p>
  
  <p>Any help appreciated. Thanks very much!</p>
  
  <p>EDIT:
  What I'm using:</p>
  
  <p>CUDA 5.0, GTX480 which is cc. 2.0.</p>
  
  <p>What I've already done:</p>
  
  <p>I've made a script that gets the formulas for each of the metrics from the profiler documentation site, resolves dependencies for any given metric, extracts those through nvprof and then counts the results from those. This involved using a (rather large) sed script that changes all the occurrences of variables that appear on the site to the ones with the same meaning that are actually accepted by the profiler. Basically I've emulated grepping metrics via nvprof. I'm just having problems with those:</p>
  
  <p>Why there is a problem with those concrete variables:</p>
  
  <p>max_warps_per_sm - If it is the bound of the cc or another metric/event which I am perhaps somehow missing and is specific for my program (wouldn't be a surprise as some of the variables in the profiler documentation have 3 (!) different names all for the same thing).</p>
  
  <p>elapsed_cycles - I don't have elapsed_cycles in the output of nvprof --query-events. Not even anything containing the words "elapse" and the only one containing "cycle" is "active_cycles". Could that be it ? Is there any other way to count it? Is there any harm done in using "gputime" instead of this variable ? I don't need absolute numbers, I'm using it to find correlations and analyze code so if "gputime"= "elapsed_cycles" * CONSTANT, I'm perfectly okay with that.</p>