Skip to content Skip to sidebar Skip to footer

Cudagetdevice() Failed. Status: Cuda Driver Version Is Insufficient For Cuda Runtime Version

I get the following error when l run tensorflow in GPU. 2018-09-15 18:56:51.011724: E tensorflow/core/common_runtime/direct_session.cc:158] Internal: cudaGetDevice() failed. Status

Solution 1:

Updating nvidia driver solved this issue.

You can check your cuda toolkit compatiblity here. Then update your nvidia driver by downloading it from here.

Solution 2:

The reason for this error is the mismatch of your installed Cuda Toolkit version and the version of the python package cudatoolkit, which is usually installed as dependency of tensorflow-gpu.

In order to fix this you have to first match your tensorflow version with your installed Cuda Toolkit version like shown here

Then you have to check the version of your cudatoolkit package. This have to match major and minor version, so e.g. if you have Cuda Toolkit 9.0 installed and cudatoolkit9_1 is installed you need to downgrade to cudatoolkit9 via your python.

Solution 3:

In the case I just solved, it was updating the GPU driver to the latest and installing the cuda toolkit. Your error is telling you your CUDA driver version is too old. I believe the nvcc version we were seeing was 7.5, and you have 7.3.

I think all you will have to do is: sudo apt install nvidia-cuda-toolkit then reboot.

Below are the steps I took for the problem where the libcuda.so.1 file could not be found.

First, the ppa was added and a newer GPU driver installed:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-390

After adding the ppa, it showed options for driver versions, and 390 was the latest 'stable' version that was shown.

Then install the cuda toolkit:

sudo apt install nvidia-cuda-toolkit

Then reboot:

sudo reboot

It updated the drivers to a newer version than the 390 originally installed in the first step (it was 410; this was a p2.xlarge instance on AWS).

Solution 4:

Just update your nvidia drivers and it will solve the issue

Solution 5:

Same problem. Solved updating nvidia driver, because a I was using tensorflow 2.1 and it requires updated driver. Soo, I was using 390 and updated to 435, through Ubuntu's software manager.

Post a Comment for "Cudagetdevice() Failed. Status: Cuda Driver Version Is Insufficient For Cuda Runtime Version"