2
$\begingroup$

I'm working on a Python Keras/Tensorflow image recognition script (on Ubuntu 18.04) which works ok, but it will only train on CPU (which is slow) and I want to be using my GPU (i have a Nvidia Geforce GTX1080).

I have installed:

  • tensorflow-gpu 2.0.0-beta1 (via pip; note i also tried 1.4 but same issue)
  • Cuda10.2 (via deb files from Nvidia website)
  • cuDNN 7.6.5 (via Nvidia dev website)
  • CUPTI (via apt)
  • Nvidia drivers 440.33.01

$ nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| 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 1080    On   | 00000000:B3:00.0  On |                  N/A |
| 38%   42C    P0    38W / 180W |    213MiB /  8118MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      2109      G   /usr/lib/xorg/Xorg                           210MiB |
+-----------------------------------------------------------------------------+

However when I run my script, tensorflow is unable to use the GPU, and gives these errors (and falls back to running on CPU):

I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties: 
name: GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.7335
pciBusID: 0000:b3:00.0
I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
W tensorflow/core/common_runtime/gpu/gpu_device.cc:1663] Cannot dlopen some GPU libraries. Skipping registering GPU devices...

I seem to be missing these libraries: libcudart.so.10.0, libcublas.so.10.0, libcufft.so.10.0, libcurand.so.10.0, libcusolver.so.10.0, libcusparse.so.10.0, but I'm not sure how to get them installed, apt does not appear to have version 10 available for these packages.

$\endgroup$
1
$\begingroup$

Seems like you have a CUDA version conflict. Remove the existing CUDA 10.2 and install CUDA 10.0 (going by your missing libraries, it requires a v10.0).

You can find the archived releases here: https://developer.nvidia.com/cuda-toolkit-archive

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.