title: Using Theano with GPU on Ubuntu 14.04 on AWS g2
body: <p>I'm having trouble getting Theano to use the GPU on my machine.  </p>
  
  <p>When I run:
  /usr/local/lib/python2.7/dist-packages/theano/misc$ THEANO_FLAGS=floatX=float32,device=gpu python check_blas.py
  WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available  (error: Unable to get the number of gpus available: no CUDA-capable device is detected)</p>
  
  <p>I've also checked that the NVIDIA driver is installed with: lspci -vnn | grep -i VGA -A 12</p>
  
  <p>with result: Kernel driver in use: nvidia</p>
  
  <p>However, when I run: nvidia-smi
  result: NVIDIA: could not open the device file /dev/nvidiactl (No such file or directory).
  NVIDIA-SMI has failed because it couldn't communicate with NVIDIA driver. Make sure that latest NVIDIA driver is installed and running.</p>
  
  <p>and /dev/nvidiaactl doesn't exist. What's going on?</p>
  
  <p>UPDATE: /nvidia-smi works with result:</p>
  
  <pre><code>+------------------------------------------------------+
  | NVIDIA-SMI 4.304...   Driver Version: 304.116        |
  |-------------------------------+----------------------+----------------------+
  | GPU  Name                     | Bus-Id        Disp.  | Volatile Uncorr. ECC |
  | Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage         | GPU-Util  Compute M. |
  |===============================+======================+======================|
  |   0  GRID K520                | 0000:00:03.0     N/A |                  N/A |
  | N/A   39C  N/A     N/A /  N/A |   0%   10MB / 4095MB |     N/A      Default |
  +-------------------------------+----------------------+----------------------+
  
  +-----------------------------------------------------------------------------+
  | Compute processes:                                               GPU Memory |
  |  GPU       PID  Process name                                     Usage      |
  |=============================================================================|
  |    0            Not Supported                                               |
  +-----------------------------------------------------------------------------+
  </code></pre>
  
  <p>and after compiling the NVIDIA_CUDA-6.0_Samples then running deviceQuery I get result:</p>
  
  <p>cudaGetDeviceCount returned 35
  -> CUDA driver version is insufficient for CUDA runtime version
  Result = FAIL</p>