I am working with Theano, a deep learning benchmark, on a freshly installed Ubuntu Mate 16.04 machine. Theano can use GPU acceleration for speeding up calculations. I have a NVIDIA K2200M video card which is CUDA-capable and is correctly installed, as the nvidia-smi
command shows:
+------------------------------------------------------+
| NVIDIA-SMI 361.42 Driver Version: 361.42 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro K2200M Off | 0000:01:00.0 Off | N/A |
| N/A 31C P8 N/A / N/A | 212MiB / 2047MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1090 G /usr/lib/xorg/Xorg 200MiB |
| 0 7931 G /usr/lib/firefox/firefox 1MiB |
+-----------------------------------------------------------------------------+
A bit of background: Theano needs to be set up so that a few environmental variables have to be defined, such as $CUDA_ROOT
, and these refer to /usr/local/cuda
but installing nvidia-cuda-*
from the official Ubuntu Mate repo does not create those folders. Nevertheless, Theano offers a python code which can help determine if the calculations are being made with the CPU or the GPU and surprisingly Theano finds the CUDA installation.
Here comes the problem: CUDA is recognized by the system but CUDA can't seem to find my GPU, and I get the error WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available (error: cuda unavailable)
.
I am writing in askubuntu.com
and not to the Theano developers because, finding this problem, I uninstalled nvidia-cuda-*
and I installed CUDA from the official package provided by NVIDIA following this guide, so that the aforementioned /usr/local/cuda
was created and, again, the Theano code recognized the CUDA installation but it still couldn't find my GPU. That is the reason why I think it might be an Ubuntu issue instead of being a faulty implementation on Theano's side.