title: Compiling CUDA program for a GeForce 310 (compute capability 1.2) with unmatched options "-arch=compute_20 -code=sm_20"
body: <p>I'm compiling a CUDA program using <code>nvcc</code> with options <code>-arch=20 -code=20</code> for a GeForce 310 GPU having compute capability 1.2. The program seems to run normally as follows.</p>
  
  <pre><code>wangli@wangli-desktop:~/wangliC2050/1D-EncodeV6.1$ make
  nvcc -O --ptxas-options=-v 1D-EncodeV6.1.cu -o 1D-EncodeV6.1 -I../../NVIDIA_GPU_Computing_SDK/C/common/inc -I../../NVIDIA_GPU_Computing_SDK/shared/inc  -arch=compute_20 -code=sm_20 
  ptxas info    : Compiling entry function '_Z6EncodePhPjS0_S_S_' for 'sm_20'
  ptxas info    : Function properties for _Z6EncodePhPjS0_S_S_
      0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
  ptxas info    : Used 14 registers, 52 bytes cmem[0]
  wangli@wangli-desktop:~/wangliC2050/1D-EncodeV6.1$ ./1D-EncodeV6.1 
  ########################### Encoding start (loopCount=10)#######################
  #p  n   size    averageTime(s)  averageThroughput(MB/s) errorRate(0~1)
  #================= Encode on GPU v6.1 ===============
  4   4   4   0.000294    0.051837    100.000000
  #################### Encoding stop #########################
  </code></pre>
  
  <p>So, I wonder: </p>
  
  <ol>
  <li>Why this program could run on a GeForce 310 with <code>nvcc</code> options <code>-arch=compute_20 -code=sm_20</code> which do not match the compute capability 1.2 of the card?</li>
  <li>What will happen if the value of the <code>-arch</code> option will differ from that of the <code>-code</code> option?</li>
  </ol>
  
  <p>Thanks.</p>