Repository: tensorflow
Issue: tensorflow cuda Unable to register cuDNN factory error in wsl2 with tf 2.17,18
Labels: stat:awaiting response,type:build/install,wsl2,TF 2.18

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

tf 2.18

### Custom code

No

### OS platform and distribution

wsl2 ubuntu 24.04lts

### Mobile device

windows 11 x86

### Python version

3.12

### Bazel version

_No response_

### GCC/compiler version

gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

### CUDA/cuDNN version

12.5/9.3

### GPU model and memory

rtx 4060 laptop gpu/8gb vram/16gb ram

### Current behavior?

python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
2025-01-15 05:03:52.570454: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2025-01-15 05:03:52.577748: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1736917432.586305     920 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1736917432.588797     920 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2025-01-15 05:03:52.597990: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
v2.18.0-rc2-4-g6550e4bd802 2.18.0

### Standalone code to reproduce the issue
steps:
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#verify-you-have-a-cuda-capable-gpu
use wsl method

```shell
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
```

### Relevant log output

```shell
2025-01-15 05:03:52.570454: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2025-01-15 05:03:52.577748: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1736917432.586305     920 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1736917432.588797     920 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2025-01-15 05:03:52.597990: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
v2.18.0-rc2-4-g6550e4bd802 2.18.0
```