what is and how to upgrade nvidia Runtime API Version? - tensorflow

When I run a process that uses paddle, an error occured:
W1206 13:55:49.811826 22388 device_context.cc:447] Please NOTE:
device: 0, GPU Compute Capability: 6.1, Driver API Version: 11.5,
Runtime API Version: 10.2 W1206 13:55:49.812117 22388
dynamic_loader.cc:287] The third-party dynamic library (libcudnn.so)
that Paddle depends on is not configured correctly. (error code is
/usr/local/cuda/lib64/libcudnn.so: cannot open shared object file: No
such file or directory) Suggestions:
Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you
installed.
Configure third-party dynamic library environment variables as follows:
Linux: set LD_LIBRARY_PATH by export LD_LIBRARY_PATH=...
Windows: set PATH by `set PATH=XXX;
doesn't have a clue what is Runtime API Version and how to upgrade it to 11.5 (as same as Driver API Version).Any help would be appreciated~
os:
ubuntu 18.04
nvidia-smi:
NVIDIA-SMI 495.44 Driver Version: 495.44 CUDA Version: 11.5

Related

DPCT migration fails with error code (-5)

I have updated my CUDA toolkit version to 11.4. When I try to migrate any CUDA code to DPC++ using DPCT tool, I get the following error:
dpct exited with code: -5 (Error: Path for CUDA header files is invalid or not available. Specify with --cuda-include-path)
I have even specified the cuda-include-path flag but the error still persists. I'm I missing something?
Environment:
OS: CentOS 8
oneAPI base tookit version: 2021.3
DPCT tool does not support CentOS version 8. You can try using any of the supported versions of OS for DPCT migration.
Refer to the below link for the supported OS and their versions.
https://software.intel.com/content/www/us/en/develop/articles/intel-dpc-compatibility-tool-system-requirements.html

How to install GPU driver on Google Deep Learning VM?

I just created a Google Deep Learning VM with this image:
c1-deeplearning-tf-1-15-cu110-v20210619-debian-10
The tensorflow version is 1.15.5. But when I run
nvidia-smi
it says -bash: nvidia-smi: command not found.
When I run
nvcc --version
I got
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Thu_Jun_11_22:26:38_PDT_2020
Cuda compilation tools, release 11.0, V11.0.194
Build cuda_11.0_bu.TC445_37.28540450_0
Does anyone know how to install the GPU driver? Thank you in advance!
Update: I've noticed that if you select GPU instance, then the GPU driver is pre-installed.
This is the guide: Installing GPU drivers.
Required NVIDIA driver versions
NVIDIA GPUs running on Compute Engine must use the following NVIDIA driver versions:
For A100 GPUs:
Linux : 450.80.02 or later
Windows: 452.77 or later\
For all other GPU types:
Linux : NVIDIA 410.79 driver or later
Windows : 426.00 driver or later
I would suggest to delete the instance and create another one. Keep in mind the version compatibility here and here. If you are installing drivers by yourself then whats the point of using pre-build instance.

Chainer: No module named 'cupy.util'`

I am getting desperate with Chainer because I'm not able to use it with GPU for about a week now. The error I am getting:
RuntimeError: CUDA environment is not correctly set up (see https://github.com/chainer/chainer#installation).No module named 'cupy.util'
Code to reproduce:
import chainer
chainer.cuda.to_gpu([0, 0])
Output of chainer.backends.cuda.available is False.
Working on Ubuntu 20.04 (I know, it is not the one from the recommended on Chainer's docs) inside WSL2. CUDA drivers 11.0. Output of nvcc -V:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_Jul_22_19:09:09_PDT_2020
Cuda compilation tools, release 11.0, V11.0.221
Build cuda_11.0_bu.TC445_37.28845127_0
CUDA samples compile and work properly inside WSL2.
According to pip freeze, cupy-cuda110 is installed within an (activated) virtual environment (but not detected, it seems). Chainer version 7.7.0 is installed.
Any ideas how to fix it?
Solution from https://github.com/chainer/chainer/issues/8582 did not seem to do the trick for me.
The error message is very clear. Just change L69 of backends/cuda.py:
from cupy.util import PerformanceWarning as _PerformanceWarning
to
from cupy._util import PerformanceWarning as _PerformanceWarning
along with the solution from #8582, everything will work just fine.

I am having Error importing tensorflow as tf?

while importing tensorflow
Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-08-28 00:21:19.206030: 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.
system
Hp 245 g5 notebook
operating system ubuntu 18.4
How to solve the problem?
It seems you are trying to use the TensorFlow-GPU version and you have downloaded conflicting software versions for it.
Note: GPU support is available for Ubuntu and Windows with CUDA enabled cards only.
If you have a Cuda enabled card follow the instructions provided below.
As stated in Tensorflow documentation. The software requirements are as follows.
Nvidia gpu drivers - 418.x or higher
Cuda - 10.1 (TensorFlow >= 2.1.0)
cuDNN - 7.6
Make sure you have these exact versions of the software mentioned above. See this
Also, check the system requirements here.
For downloading the software mentioned above see here.
For downloading TensorFlow follow the instructions provided here to correctly install the necessary packages.

Can CUDA 10.0 and 10.1 be on the same system?

I want support for both Visual Studio 2019 (which needs CUDA 10.1) and TensorFlow-GPU 1.14 (which needs CUDA 10.0) on a Windows PC. Is there any methods?
I simply installed CUDA 10.0 and CUDA 10.1, and add both directory into environment variable CUDA_PATH. cuDNN is already installed.
The result is Visual Studio can detect CUDA but TensorFlow cannot.
Yes, more than one version of the CUDA toolkit can exist on a system and be used by different applications.
How are you installing TensorFlow-GPU? If you're compiling it yourself, during configuration you can specify the path to whichever version of CUDA that you want to use. If you're installing a pre-built set of binaries (e.g. using something like Anaconda) then that's already been built against a specific version of the CUDA toolkit; you'll need to fetch a different version of the binaries compiled for whichever CUDA toolkit you want, or build it yourself.
If you use Anaconda to install TensorFlow-GPU, you should also receive the correct version of the CUDA toolkit that's needed to run whichever version of TensorFlow-GPU that you've installed; it takes care of those dependencies for you.