Tensorflow does not recognize nvidia gpu with cuda and cudnn visualstudio installed

Computer Acer Nitro 5 under Window 11 Family. Ram 16 gigas. Two Graphic cards Intel(R) UHD Graphics and NVIDIA Geforce RTX 3060 Laptop GPU. Cuda version 12.1 Driver version 531.61. Installed cuda toolkit 12.1 and CuDNN 8.9.1 . Visual Studio 2022 with C++ . When I run in Visual Studio 2022 a sample cuda file that sums two vectors in the GPU it works fine. After installing Tensorflow 2.12.0 with python 3.11.3 I get :


hereafter environment variables

I have tried many times after checking environment variables but it never recognizes the gpu. Tensorflow works only on CPU.

Can somebody help me get out of this situation or direct me to someone who can.

Thank you in advance.

I know nothing about Tensorflow, but when I go here under “Windows Native”, I see a Caution:

" 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"

I think your answer will help. Thank you. I understand WSL2 is a linux subsystem that can be installed on windows. I shall implement as soon as I have time.