title: CUDA "too many resources requested for launch" in Release, not in Debug
body: <p>I am using Visual Studio 2012 and when I launch my program in Debug mode, it runs smoothly.
  However, when I run it in release mode, I get the error "too many resources requested for launch" on one of my kernel.</p>
  
  <p>I went to compare the compilation parameters between debug and release, and it seems that when I change the option "Generate GPU Debug Information" to "Yes (-G)", the problem disappears.</p>
  
  <p>Why is it so ? Is there something I am missing to be able to run the program without that option ?</p>
  
  <p>Compile options:</p>
  
  <pre><code>D:\Dev\CUDA\bin\nvcc.exe -gencode=arch=compute_50,code=\"sm_50,compute_50\" --use-local-env --cl-version 2012 -ccbin "D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64"  -ID:\Dev\CUDA\include -ID:\Dev\CUDA\include  -G -lineinfo  --keep-dir x64\Release -maxrregcount=0  --machine 64 --compile -cudart static     -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Zi  /MD  " -o x64\Release\main.cu.obj "D:\Dev\Projets\CUDA\ProjAdvMetrixCuda6\Discrete choice v2\main.cu" 
  </code></pre>