I now lost 3 days of my valuable life trying to get tensorflow to detect and use my GPU to train some neuronal network models and I desperately need help.
I tried uncountable tutorials and forum posts but nothing did work.
I have a MSI GTX 1070 (latest driver)
Windows 10 Pro 64bit
CUDA 11.8.0 (I checked the tf homepage if my versions are compatible, and they should be)
CuDNN 8.6.0
tensorflow 2.12.0
Python 3.10.11
I tried seing my GPU with “print(tf.config.list_physical_devices(‘GPU’))” in VSC and Anaconda Prompt and both returned nothing Restarting the PC uncountable times didn’t change anything.
Hi @Marius, TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows. Starting with TensorFlow 2.11, you will need to install TensorFlow in WSL2, or install tensorflow-cpu` and, optionally, try the TensorFlow-DirectML-Plugin. For installing WSL2 please refer to this document. Thank You.
Hi Kiran,
thanks a lot for your response!
Is it possible to uninstall my version of tf and just install tf 2.10? (And the compatible versions of cuda und cudnn to harmonize with tf 2.10)
Do you have any advice/tips on how to find out wether VSC is now really using my GPU or not? To verify wether it just knows that the GPU is there or it’s actually using it? And is it possible to turn it off or on to use the gpu?
Actually, I struggled with similar issues and now I write this for anyone who still seeks:
Instead of typing “pip install tensorflow” (or “pip install tensorflow”<11"“) I typed “conda install tensorflow” (“conda install tensorflow”<11"” in Windows). Problem was that Anaconda didn’t see tensorflow, since it was installed by pip (don’t ask, I don’t know why).
Hey @Marius
I have done the same things as you. Where should i run these commands to check the availability of the gpu. Also i have 2 gpu’s (GPU-0(512mb) and GPU-1(4gb)). Of these two which one should be working when i train my model.
Hi @onehit1499, As per the test built configuration Tensorflow 2.10 Version supports python 3.7-3.10. For installation you can use pip install tensorflow==2.10. Thank You.
hey @Kiran_Sai_Ramineni , Sorry for asking this late. As of right now i have tensor flow 2.12 installed in an virtual environment and i have cuda 11.8 and cudnn 8.6. How do i install cuda 11.2 , if there’s no option for windows 11
hi @Kiran_Sai_Ramineni, l also have the same problem, that tensorflow can’t find my gpu. l have tensorflow 2.15.0, python 3.10, cuda 12.4.0 and cudnn 9.0.0. l really don’t understand whats wrong and l can’t find the apropriate version to be compatible… l also have the cuda and cudnn in the path variable.
You can find the list of test build configurations here. You can use pip install tensorflow[and-cuda] command which will automatically install CUDA and CUDNN supported for tensorflow 2.15.
Also note that TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows. Starting with TensorFlow 2.11 , you will need to install TensorFlow in WSL2, or install tensorflow or tensorflow-cpu and, optionally, try the TensorFlow-DirectML-Plugin. Thank You.