marlon
marlon

Reputation: 7633

Why is tensorflow looking for cuda10.1 while cuda 10.0 installed?

I am on Ubuntu 18.04. And output of following commands:

nvidia-smi
Fri Dec  4 11:35:09 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.01    Driver Version: 418.87.01    CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla M40           On   | 00000000:00:08.0 Off |                  Off |
| N/A   59C    P0   146W / 250W |  11724MiB / 12215MiB |    100%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

dpkg -l | grep cuda
ii  cuda-command-line-tools-10-0                          10.0.130-1                        amd64        CUDA command-line tools
ii  cuda-compat-10-0                                      410.104-1                         amd64        CUDA Compatibility Platform
ii  cuda-cublas-10-0                                      10.0.130-1                        amd64        CUBLAS native runtime libraries
ii  cuda-cudart-10-0                                      10.0.130-1                        amd64        CUDA Runtime native Libraries
ii  cuda-cudart-dev-10-0                                  10.0.130-1                        amd64        CUDA Runtime native dev links, headers
ii  cuda-cufft-10-0                                       10.0.130-1                        amd64        CUFFT native runtime libraries
ii  cuda-cuobjdump-10-0                                   10.0.130-1                        amd64        CUDA cuobjdump
ii  cuda-cupti-10-0                                       10.0.130-1                        amd64        CUDA profiling tools interface.
ii  cuda-curand-10-0                                      10.0.130-1                        amd64        CURAND native runtime libraries
ii  cuda-cusolver-10-0                                    10.0.130-1                        amd64        CUDA solver native runtime libraries
ii  cuda-cusparse-10-0                                    10.0.130-1                        amd64        CUSPARSE native runtime libraries
ii  cuda-driver-dev-10-0                                  10.0.130-1                        amd64        CUDA Driver native dev stub library
ii  cuda-gdb-10-0                                         10.0.130-1                        amd64        CUDA-GDB
ii  cuda-gpu-library-advisor-10-0                         10.0.130-1                        amd64        CUDA GPU Library Advisor.
ii  cuda-license-10-0                                     10.0.130-1                        amd64        CUDA licenses
ii  cuda-memcheck-10-0                                    10.0.130-1                        amd64        CUDA-MEMCHECK
ii  cuda-misc-headers-10-0                                10.0.130-1                        amd64        CUDA miscellaneous headers
ii  cuda-nvcc-10-0                                        10.0.130-1                        amd64        CUDA nvcc
ii  cuda-nvdisasm-10-0                                    10.0.130-1                        amd64        CUDA disassembler
ii  cuda-nvprof-10-0                                      10.0.130-1                        amd64        CUDA Profiler tools
ii  cuda-nvtx-10-0                                        10.0.130-1                        amd64        NVIDIA Tools Extension
ii  cuda-repo-ubuntu1804                                  10.1.243-1                        amd64        cuda repository configuration files
ii  libcudnn7                                             7.4.1.5-1+cuda10.0                amd64        cuDNN runtime libraries
ii  libnvinfer5                                           5.0.2-1+cuda10.0                  amd64        TensorRT runtime libraries
ii  nvinfer-runtime-trt-repo-ubuntu1804-5.0.2-ga-cuda10.0 1-1                               amd64        nvinfer-runtime-trt repository configuration files

So I have cuda10.0 installed. I also set up the path:

export CUDA_HOME=/usr/local/cuda
export PATH=${CUDA_HOME}/bin:${PATH}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:$LD_LIBRARY_PATH

But then why does it gives this error? It looks for cuda10.1, instead of cuda10.0?

python3 -c 'import tensorflow as tf; print(tf.__version__)'
2020-12-04 11:37:43.929779: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/hadoop/lib/native:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
2020-12-04 11:37:43.929830: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2.3.1

Upvotes: 1

Views: 810

Answers (1)

user11530462
user11530462

Reputation:

According to Tensorflow tested build configuration from TF 2.1 to TF 2.3, it required CUDA 10.1 version, hence you received above error.

If you would like to use CUDA 10.0, then compatible versions are TF_GPU 1.15 and TF 2.0.

As rightly suggested by Poe Dator, you can upgrade to CUDA 10.1 instead of tensorflow downgrading. Because latest versions addressed many of the performance issues.

Upvotes: 1

Related Questions