title: Different CUDA versions shown by nvcc and NVIDIA-smi
body: <p>I am very confused by the different CUDA versions shown by running <code>which nvcc</code> and <code>nvidia-smi</code>. I have both cuda9.2 and cuda10 installed on my ubuntu 16.04. Now I set the PATH to point to cuda9.2. So when I run</p>
  <pre class="lang-sh prettyprint-override"><code>$ which nvcc
  /usr/local/cuda-9.2/bin/nvcc
  </code></pre>
  <p>However, when I run</p>
  <pre><code>$ nvidia-smi
  Wed Nov 21 19:41:32 2018       
  +-----------------------------------------------------------------------------+
  | NVIDIA-SMI 410.72       Driver Version: 410.72       CUDA Version: 10.0     |
  |-------------------------------+----------------------+----------------------+
  | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
  | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
  |===============================+======================+======================|
  |   0  GeForce GTX 106...  Off  | 00000000:01:00.0 Off |                  N/A |
  | N/A   53C    P0    26W /  N/A |    379MiB /  6078MiB |      2%      Default |
  +-------------------------------+----------------------+----------------------+
                                                                                 
  +-----------------------------------------------------------------------------+
  | Processes:                                                       GPU Memory |
  |  GPU       PID   Type   Process name                             Usage      |
  |=============================================================================|
  |    0      1324      G   /usr/lib/xorg/Xorg                           225MiB |
  |    0      2844      G   compiz                                       146MiB |
  |    0     15550      G   /usr/lib/firefox/firefox                       1MiB |
  |    0     19992      G   /usr/lib/firefox/firefox                       1MiB |
  |    0     23605      G   /usr/lib/firefox/firefox                       1MiB |
  </code></pre>
  <p>So am I using cuda9.2 as <code>which nvcc</code> suggests, or am I using cuda10 as <code>nvidia-smi</code> suggests? I <a href="https://stackoverflow.com/questions/34319877/nvcc-has-different-version-than-cuda">saw this answer</a> but it does not provide direct answer to the confusion, it just asks us to reinstall the CUDA Toolkit, which I already did.</p>