Home > Blockchain >  getting tensorflow to run on GPU
getting tensorflow to run on GPU

Time:12-03

I've been trying to get this to work forever and still no luck

I have:

  • GTX 1050 Ti (on Lenovo Legion laptop)
  • the laptop also has an Intel UHD Graphics 630 (i'm not sure if maybe this is interfering?)
  • Anaconda
  • Visual Studio
  • Python 3.9.13
  • CUDA 11.2
  • cuDNN 8.1
  • I added these to the PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\libnvvp
  • finally I installed tensorflow and created its own environment

and I still can't get it to read my GPU

basically followed https://www.youtube.com/watch?v=hHWkvEcDBO0&t=295s

AND I'm still having no luck.

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

yields only information on the CPU

Can anyone please help?

CodePudding user response:

You can upgrade tensorflow to 2.0. It should solve your problem.

CodePudding user response:

Check your tensorflow version and compatability with GPU, update your GPU drivers. CUDA 9/10 would do the job.

follow the official tensorflow link: https://www.tensorflow.org/install/pip#windows-native_1

Do all the steps in the same environment in anaconda.

  • Related