GTX 4080 - no CUDA GPU Tensorflow, while works on torch

Despite trying many combinations of CUDA & CUDNN (12.1, 11.8+8.8, 11.8+8.6)
shows only CPU, no GPU.
Torch sees GPU well:
‘NVIDIA GeForce RTX 4080 Laptop GPU’

Tried various GPU drivers, instalation types - invidia, manjaro pamac, conda, no luck. The laptop is
Lenovo Legion Pro 7-16 i9-13900HX/32GB/1TB/Win11 RTX4080 240Hz.

Any suggestion on how to debug would be great.

side note: best Linux option 4 this laptop appears to be Manjaro with kernel 6.2, no problems with installing both native nvidia and distro prepared drivers for GPU, no problem with Touchpad.


Welcome to the Tensorflow Forum!

According to Install Tensorflow with pip on Windows

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.

Are you using the latest version of Tensorflow 2.12 ?

If yes, could you please try as suggested above and let us know?

Thank you!

Thank You very much for the response. Good to know about the changes reg the Windows version. Yes, I am using the TF v 2.12.

Actually, just after posting the question, it turned out the solution with Docker and nvidia-container-toolkit + nvidia-container-runtime worked quite well on that Legion 7with GTX 4080. I used the TF preconfigured docker image, as described in:
Build from source  |  TensorFlow .

Since it worked on Linux, I didn’t even try it on WIndows with WSL, that would be the last resort.

Side note:
The GPU was used quite successfully. The result on my personal benchmarking NN model, training phase :slight_smile: was:
Legion 7
5/6 seconds on RTX 4080 GPU
17 seconds on i9-13900HX CPU
in comparison to:
other laptops:
25 seconds for training on i7-6820HQ CPU
12 seconds on nVidia Quadro M1000M

19 seconds on i7-12800HX CPU
7 seconds on RTX A2000 GPU, 2 seconds (!) after tweaking with cpupower linux utility

BTW - I had an opportunity to replace this Legion 7 with Thinkpad P16, as there were problems with working on Legion 7 on Linux - for example it got overheated during compilation of the tensorflow source code and didn’t finish it.