0

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

myissue

talonmies
  • 70,661
  • 34
  • 192
  • 269
prairieCoder
  • 11
  • 1
  • 1
  • what's your GPU series? – CuCaRot Dec 03 '21 at 07:28
  • I very much doubt you have those DLLs in the correct folder – talonmies Dec 03 '21 at 07:53
  • There is literally a link in the error to a guide that tells you what to do, about setting the PATH variables to point to your CUDA libs, did you try them? – Dr. Snoopy Dec 03 '21 at 08:11
  • @CuCaRot I have an rtx 3070 mobile on this machine. – prairieCoder Dec 04 '21 at 22:25
  • @talonmoes I had posted a picture in the post that shows where the files are located, if you look at the photo you can sew where they are, and I am quite sure they are in the correct location. – prairieCoder Dec 04 '21 at 22:26
  • @Dr.Snoopy Yes, I had changed the paths on both local and system wide paths. – prairieCoder Dec 04 '21 at 22:27
  • Also, I should note, that I did not directly solve the problem, however I found a different way to make it work. – prairieCoder Dec 04 '21 at 22:27
  • A friend found a lost of commands to just run in the anaconda prompt, and it installs cudnn, cuda, and tensorflow for an environment, and then it happened to work with another environment running python 3.9? – prairieCoder Dec 04 '21 at 22:28
  • @prairieCoder: your certainty that those dlls are in the correct place is the root cause of this problem. They are not. Move them to where all the other CUDA dlls are located and things will magically start working. Leave them where they are and they will not. Your choice – talonmies Dec 06 '21 at 07:11

1 Answers1

1

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.

Alex Knapp
  • 86
  • 3
  • I have a photo posted to show where the files are located, and it is in the exact location you have referenced – prairieCoder Dec 04 '21 at 22:29
  • Perhaps [link](https://www.minitool.com/news/register-dll-file-on-windows.html) will offer some assistance? I was lucky enough to only need to restart my jupyter notebook for it to register the new files, as it opens CUDA it likely won't be an issue with being on the PATH. – Alex Knapp Dec 04 '21 at 23:40
  • Thanks, I'll keep thay in mind for next time. – prairieCoder Dec 05 '21 at 01:05