Could not load library cudnn_ops_infer64_8.dll. Error code 126 Please make sure cudnn_ops_infer64_8.dll is in your library path. I've tried searching online but it's been hours and I haven't found anything. I would really appreciate anyone sharing his thoughts. I'm trying to run ai-benchmark library which internally tests for performance of gpu against popular datasets. (see image)
You should have downloaded CUDA zip file. Go to that file, extract it and in the bin folder you will see
cudnn_adv_infer64_8.dll
cudnn_adv_train64_8.dll
cudnn_cnn_infer64_8.dll
cudnn_cnn_train64_8.dll
cudnn_ops_infer64_8.dll
cudnn_ops_train64_8.dll
Copy these files into your nvidia gpu computing toolkit\cuda\bin folder.
In my case, it is because I did not install zlib
, and after I install it, it works!!
Leaving an answer to respond to Diego Rueda's comment on MADM4X's post.
I ran into the same issue: copied the cuDNN files into my CUDA toolkit install and received the Error Code 126.
You need to specifically download/copy cuDNN Version 8.1.x. If you use the latest version (8.3.x) you'll receive the error Code described in the original post.
TensorFlow doesn't seem to be as sensitive to the Toolkit's version (I'm running 11.4), but I haven't explored all of the features to make sure they work.
For more context, you can find the specific CUDA/cuDNN versions listed on TensorFlow's website.
Jupyter notebook was locking the file in my case, closing Jupyter notebook server solved it for me.
Spyder
worked in my case. Thanks @Forfar ! –
Twibill I had the same problem and just went thru the Prerequisites: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#prerequisites-windows
Check if all the cudnn[.dll, .h, .lib]* files and zlivwapi.dll are in the system path. Once all are in path, the problem is solved.
Have faced the same issue, could able to fix it by downloading the files from CUDNN and copy to "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDNN\v5.1\bin".
In was working with a conda environment so I updated the PATH variable and it started working:
import os
os.environ["PATH"] += os.environ["PATH"] + ";" + r"C:\ProgramData\Anaconda3\envs\myenv\Lib\site-packages\nvidia\cudnn\bin" + ";" + r"C:\ProgramData\Anaconda3\envs\myenv\Lib\site-packages\nvidia\cublas\bin"
I had installed the Nvidia libraries by:
pip install nvidia-cublas-cu11 nvidia-cudnn-cu11
This is will add both cudnn_ops_infer64_8.dll
& cublasLt64_11.dll
© 2022 - 2024 — McMap. All rights reserved.