Reputation: 341
When trying to use Tensorflow (gpu), it won't run because of this :
Could not load library cudnn_cnn_infer64_8.dll. Error code 193 Please make sure cudnn_cnn_infer64_8.dll is in your library path!
The thing is, that I have this lib :
and I've added the environnement variables :
Full error message :
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2022-01-02 00:22:39.438945: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /device:GPU:0 with 5468 MB memory: -> device: 0, name: NVIDIA GeForce RTX 3070, pci bus id: 0000:01:00.0, compute capability: 8.6 2022-01-02 00:22:40.466945: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 5468 MB memory: -> device: 0, name: NVIDIA GeForce RTX 3070, pci bus id: 0000:01:00.0, compute capability: 8.6 2022-01-02 00:22:41.646700: I tensorflow/stream_executor/cuda/cuda_blas.cc:1774] TensorFloat-32 will be used for the matrix multiplication. This will only be logged once. 2022-01-02 00:22:41.780145: I tensorflow/stream_executor/cuda/cuda_dnn.cc:366] Loaded cuDNN version 8301 Could not load library cudnn_cnn_infer64_8.dll. Error code 193 Please make sure cudnn_cnn_infer64_8.dll is in your library path!
Upvotes: 1
Views: 10463
Reputation: 341
It was simply because I can't read the doc properly...
I installed all the latest versions of CUDA, cuDNN and Tensorflow GPU, but they aren't compatible.
here is what helped me : https://www.tensorflow.org/install/source_windows#gpu
So I installed :
and guess what, everything works fine now !
So in case of :
Could not load library cudnn_cnn_infer64_8.dll. Error code 126
or
Could not load library cudnn_cnn_infer64_8.dll. Error code 193
Re-install CUDA with the recommended versions and don't forget to update your PATH
Upvotes: 4
Reputation: 11
I have the same problem when I use CUDA v11.6 and cuDNN v8.4.
I solve it by changing CUDA v11.6 to v11.4 and cuDNN v8.4 to v8.2.4
Upvotes: 1
Reputation: 1
My case. The PATH has been duplicated.
error
PATH=****;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\libnvvp;*****;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\libnvvp;
correct
PATH=****;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\libnvvp;
The cuda installers add path. Duplicated paths often will cause errors.
Upvotes: 0