Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

like image 616
Hissaan Ali Avatar asked Feb 24 '21 17:02

Hissaan Ali


People also ask

What is DLL Error 126?

The error is not specific to a Gen application. In general, reason code 126 "Failed to load DLL <module>" means "The specified module could not be found": https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-


3 Answers

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.

like image 130
MADM4X Avatar answered Oct 22 '22 23:10

MADM4X


In my case, it is because I did not install zlib, and after I install it, it works!!

enter image description here

like image 30
Natumsol Avatar answered Oct 22 '22 23:10

Natumsol


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.

like image 7
LVB Avatar answered Oct 22 '22 23:10

LVB