Using Theano with a GPU on Ubuntu 14.04 on AWS g2

I'm having trouble getting Theano to use the GPU on my machine.

When I run: / usr / local / lib / python 2.7 / dist-packages / theano / misc $ THEANO_FLAGS = floatX = float32, device = gpu python check_blas.py WARNING (theano.sandbox.cuda): CUDA is installed, but the gpu device unavailable (error: could not get the number of available gpus: CUDA-enabled device was not found)

I also verified that the NVIDIA driver is installed using: lspci -vnn | grep -i VGA -A 12

with result: Used kernel driver: nvidia

However, when I run: nvidia-smi, the result is: NVIDIA: the device file / dev / nvidiactl could not be opened (there is no such file or directory). NVIDIA-SMI failed because it could not communicate with the NVIDIA driver. Make sure the latest NVIDIA driver is installed and running.

and / dev / nvidiaactl does not exist. What's happening?

UPDATE: / nvidia-smi works with the result:

+------------------------------------------------------+
| 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                                               |
+-----------------------------------------------------------------------------+

and after compiling NVIDIA_CUDA-6.0_Samples and then running deviceQuery, I get the result:

cudaGetDeviceCount returned 35 -> The CUDA driver version is insufficient for the CUDA execution version Result = FAIL

+4
source share
5 answers

CUDA Linux- , " ".

.

:

  • X- .
  • GPU root (, nvidia-smi CUDA).
  • (. , ).

, root. , . 2 , , 2.

linux ( ), Linux- CUDA.

+4

CUDA 7.5, : CUDA 7.5 g++ . .

sudo apt-get install g++-4.9

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10

sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc

sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++

Anano :

(theano.sandbox.cuda): cuda_ndarray.cu: libcublas.so.7.5: : directory (theano.sandbox.cuda): CUDA , gpu (: cuda unavilable)

ldconfig, cuda 7.5:

sudo ldconfig /usr/local/cuda-7.5/lib64
+3

, AWS G2 ubuntu, , . Theano gpu this redhat AMI. Theano Redhat, Theano CentOS Theano.

0

Cuda, , PATH, /usr/local/cuda 7.0/bin LD_LIBRARY_PATH, /usr/local/cuda 7.0/lib64. PATH ( LD_LIBRARY_PATH ) /etc/environment. anano gpu. ...

0

-> CUDA driver version is insufficient for CUDA runtime version

GPU. , GPU (Performance/Power Saving Mode), ( nvidia-settings, "PRIME Profiles" ) Intel, deviceQuery script... :

But this error is misleading, choosing back NVIDIA (performance mode) using the nvidia-settings utility, the problem disappears.

This is not a version issue .

Hi

Ps: selection is available when Prime-related-stuff is installed. Additional information: https://askubuntu.com/questions/858030/nvidia-prime-in-nvidia-x-server-settings-in-16-04-1

0
source

Source: https://habr.com/ru/post/1547839/


All Articles