I have followed all the steps mentioned to install CUDA and cuDNN for Tensorflow-GPU but the command
tf.test.is_gpu_available(cuda_only=False, min_cuda_compute_capability=None)
gives False
Also while running the model I get cudart64_101.dll
even though I have installed CUDA and configured the paths.
Currently I'm using a RTX2070
Related
I have tried to get my laptop gpu to work with tensorflow, however I keep encountering this issue
I had tensorflow installed through pip (on anaconda env) with CUDA 11.2 and CUDnn 8.1, and it won't work!
I then tried a previously known version to work (tensorflow 2.4 with CUDA 11.0 and so on.
-but pip will not install tensorflow 2.4.0 (I am assuming it is no longer supported)
I have included a photo with proof of my cuda and cudnn versions
I believe the issue may lie in the folder you extract your cuDNN to.
Personally, I've extracted my cuDNN to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2.
When you open the zip cuDNN file, open the "cuda" file in the zip, and then extract the rest (bin etc.) into the above mentioned directory.
Make sure you restart the program/kernel so it can detect the new files.
Also, don't forget to add the CUDA path to your environment variables, though as it knows to look for cudnn64_8.dll I expect this is fine.
When I'm trying to run my Tensorflow code inside my conda environment myEnv001, I got the error message dlerror: cudart64_110.dll not found. I'm aware that my error is similar to a previous post, which says I didn't install CUDA.
I have CUDA 10.1 installed, but anyway I tried to re-install CUDA 10.1 for myEnv001. I ran below at my terminal, and CUDA 10.1 is installed successfully in myEnv001
> conda activate myEnv001
(myEnv001) > conda install -c anaconda cudatoolkit=10.1
But when I tried to run my Tensorflow code I still have the same error message... How can I fix it?
My library
conda: 4.10.1
Tensorflow installed in myEnv001: 2.6.0
cudatoolkit installed in myEnv001: 10.1.243
According to Tested build configurations for TF 2.6, the compatible CUDA is 11.2 and cuDNN is 8.1.
For the benefit of community providing compatibility versions are as shown below
For more details, you can refer windows and Linux/macOS tested build configurations for CPU and GPU.
I am trying to use keras in tensorflow to train a CNN network for some image classification. Obviously, the training running on my CPU is incredibly slow and so I need to use my GPU to do the training. I've found many similar questions on StackOverflow, none of which have helped me get the GPU to work, hence I am asking this question separately.
I've got an NVIDIA GeForce GTX 1060 3GB and the 466.47 NVIDIA driver installed. I've installed the CUDA toolkit from the NVIDIA website (installation is confirmed with nvcc -V command outputting my version 11.3), and downloaded the CUDNN library. I unzipped the CUDNN file and copied the files to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3, as stated on the NVIDIA website. Finally, I've checked that it's on PATH (C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin and C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\libnvvp are both in the environment variable 'Path').
I then set up an environment using conda, downloading some packages that I need, like scikit-learn, as well as tensorflow-gpu=2.3 After booting my environment into Jupyter Notebook, I run this code to check to see if it's picking up the GPU:
import tensorflow as tf
print(tf.__version__)
print(tf.config.list_physical_devices())
And get this:
2.3.0
[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU')]
I have tried literally everything I have come into contact with on this topic, but am not getting any success in getting it to work. Any help would be appreciated.
You, first, have to install all CUDA requirements. If you have Ubuntu 20.04, here is how you can install the requirements. Then it's the right time to install tensorflow. Asa you intended to utilize your GPU, you have install tensorflow-gpu library, not tensorflow alone.
I'm guessing you have installed TensorFlow correctly using pip install tensorflow.
NVIDIA GPU cards with CUDA architectures 3.5, 5.0, 6.0, 7.0, 7.5, 8.0 and higher than 8.0 are currently supported by TensorFlow. If you have the supported cards but TensorFlow cannot detect your GPU, you have to install the following software:
NVIDIA GPU drivers —CUDA 11.0 requires 450.x or higher.
CUDA Toolkit —TensorFlow supports CUDA 11 (TensorFlow >= 2.4.0)
cuDNN SDK 8.0.4
You can optionally install TensorRT 6.0 to improve latency and throughput for inference on some models.
For more info, please refer to the TensorFlow documentation: https://www.tensorflow.org/install/gpu
I recommend to use conda to install the CUDA Toolkit packages as well as CUDNN, which will avoid wasting time downloading the right packages (or making changes in the system folders)
conda install -c conda-forge cudatoolkit=11.0 cudnn=8.1
Then you can install keras and tensorflow-gpu by typing
conda install keras==2.7
pip install tensorflow-gpu==2.7
and it will work directly.
Based on this issue
I started learning about the tensorflow recently and decided to switch to the GPU version, because it is much faster, but I can not import it, it always gives the same error.
I already tried:
Installing it by pip, in python 3.6.8, cuda 10 and the most recent cuDNN for cuda 10
I tried reinstalling python, CUDA and cuDNN
Tried installing Visual Studio and installed CUDA 9 and cuDnn
I tried installing the latest Anaconda, created a "default" env and another in python 3.6 (also tried in 3.5), pip install tensorflow-gpu in both cases
my last attempt was to follow a tutorial on youtube, I did exactly as demonstrated (https://www.youtube.com/watch?v=KZFn0dvPZUQ)
Everything i tried returned the same error.
Traceback: https://pastebin.com/KMEsZAmq
The complete code: https://pastebin.com/7tS0Rd5S (was working on CPU version)
.
My Specs:
i5-8400
8 GB Ram
GTX 1060 6GB
W10 home x64
just have a look here:
https://www.tensorflow.org/install/gpu
Tensorflow supports CUDA 9.0, you will need to downgrade your CUDA or use one of the tensorflow's docker images:
https://www.tensorflow.org/install/docker
via docker it won't use your CUDA drivers
I am trying to install tensorflow(GPU) for windows using Python 3.5 but I get error when I try to import the tensorflow package.
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:119] Couldn't open CUDA library cublas64_80.dll
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_blas.cc:2294] Unable to load cuBLAS DSO.
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:119] Couldn't open CUDA library cudnn64_5.dll
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:3459] Unable to load cuDNN DSO
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:119] Couldn't open CUDA library cufft64_80.dll
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_fft.cc:344] Unable to load cuFFT DSO.
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library nvcuda.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:119] Couldn't open CUDA library curand64_80.dll
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_rng.cc:338] Unable to load cuRAND DSO.
Did you follow the instructions for installing CUDA Toolkit? You can find a link to the instructions here.
Requirements to run TensorFlow with GPU support
If you are installing TensorFlow with GPU support using one of the
mechanisms described in this guide, then the following NVIDIA software
must be installed on your system:
CUDA® Toolkit 8.0. For details, see NVIDIA's documentation
Ensure that you append the relevant Cuda pathnames to the %PATH% environment
variable as described in the NVIDIA documentation.
The NVIDIA drivers
associated with CUDA Toolkit 8.0. cuDNN v5.1. For details, see
NVIDIA's documentation. Note that cuDNN is typically installed in a
different location from the other CUDA DLLs.
Ensure that you add the
directory where you installed the cuDNN DLL to your %PATH% environment
variable. GPU card with CUDA Compute Capability 3.0 or higher. See
NVIDIA documentation for a list of supported GPU cards.