I'm having trouble getting TensorFlow to detect my NVIDIA GeForce RTX 3050 6GB GPU. I have installed TensorFlow, CUDA, and cuDNN, and my computer recognizes the GPU, but when I try to use TensorFlow, it says that no GPU is available. Here is the error message I get:
import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublas64_11.dll'; dlerror: cublas64_11.dll not found
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublasLt64_11.dll'; dlerror: cublasLt64_11.dll not found
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cusparse64_11.dll'; dlerror: cusparse64_11.dll not found
W tensorflow/core/common_runtime/gpu/gpu_device.cc:1934] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
Num GPUs Available: 0
I have already tried installing TensorFlow 2.15, but the problem persists. I'm running Python 3.9.1, CUDA 12.3.2, and cuDNN 8.9.7.29. I have checked the NVIDIA Control Panel and my GPU is enabled.And I have also added cuda and cudnn to the path.
I'm not sure what else to try. Any help would be greatly appreciated.
Additional Details:
OS: Windows 11
CPU: Intel Core i5-13420h
RAM: 16 GB
GPU: NVIDIA GeForce RTX 3050 6GB
Python: 3.9.1
TensorFlow: 2.10.1
CUDA: 12.3.2
cuDNN: 8.9.7.29
I hope this is enough information to help you diagnose the problem.
I realized that the problem was due to the lack of compatibility with the cuda version and it should be downgraded, the 11.2 version which is compatible with tensorflow 2.10.1 was not compatible with Windows 11, so the first version after that which supports Windows 11 I used it (11.4) by installing this item and its corresponding cudnn version (8.2.4.15), the problem seems to be solved, the gpu is detected and the previous warnings are not displayed. Note: Be sure to modify the cudnn environment variables afterwards. If needed, uninstall and install tensorflow.