TensorFlow Refuses to See my GPU All The Time
Hi @NickDeBeenAIE ,

I see from error log it seems CUDA driver was missing. Please install cuda driver compatible for your GPU. You can download driver from Nvidia [website](https://www.nvidia.com/Download/index.aspx). You can cross check the driver installation with `nvidia-smi` which outputs driver details if installed and running. Please share output of the command `nvidia-smi`.

Please confirm the TF version you are using and correct it in template.You can find tested configurations of cuda,cudnn wrt TF version etc from [here](https://www.tensorflow.org/install/source#gpu).

Once ensured Cuda driver installation then we should go for cuda toolkit installation and path setting. The instructions for the same can be found [here](https://www.tensorflow.org/install/pip#linux).

 I already have the Cuda driver.

My version of CuDNN is version 12. The ``nvidia-smi`` command results in driver version 530, which should clearly tell you that the GPU is present. I have also installed the Cuda Toolkit as well. @NickDeBeenAIE , 

Could you please confirm CUDA and cuDnn version you have installed ? Also have you followed instructions for CUDA path setting as instructed in documentation ? Can you confirm the commands you have used for cuda toolkit installation and path setting ? Like I said, my CuDNN version is version 12.

My Cuda Toolkit version is also the latest.

I have followed the instructions given on the CuDNN and the Cuda Toolkit page. You clearly didn't read the issue posted all the way through. > Like I said, my CuDNN version is version 12.

Is that version you mentioned is CUDA or cuDNN ? Correct me if I am wrong, AFAIK latest version of cuDNN is 8.9 only. May be you have mentioned CUDA version right ? Also Our Tested configuration for latest version i.e TF2.12 are CUDA 11.8 and cuDNN 8.2. With other versions compatibility issues may arise.

As per our documentation the recommended way for GPU setup is you have to create Conda environment and within that you need to install CUDA using conda and cudnn using pip.You need to follow the steps recommended as per documentation to install the cuda and cudnn toolkits and then configure the system paths as instructed in documentation. 

I request you to please follow the instructions as per official [documentation](https://www.tensorflow.org/install/pip#step-by-step_instructions) and then let us know if still having same problem. I do not use Anaconda for something I can run in Python.

The latest version of CuDNN is version 12.

CuDNN version 8.9.0 is old, and therefore does not run on my machine.

It won't install, nor run because its out of date. To test this, create a VM, then run:

``python3 -c import tensorflow as tf physical_devices = tf.config.list_physical_devices('GPU')``

It'll probably work for you. Oh, by the way, Anaconda is exactly the same as Python 3, because you can run Python 3 code in it.

Therefore I don't need it. Just FYI, I exported all paths to their appropriate paths while I was at it. Actually, I stand corrected on self observation, so my apologies on the CuDNN version.

My Cuda driver is version 12, but CuDNN is indeed version 8.9.0. Hi @NickDeBeenAIE ,

As confirmed please use tested configurations only.CUDA driver 12 might work.But you should have cuda toolkit 11.8 and cuDNN 8.6 installed. I am attaching below some of the logs below where i have successfully able to detect the GPU with official documentation steps and with tetsed configurations.

```
(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ nvidia-smi
Fri Apr 21 06:09:46 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.60.13    Driver Version: 525.60.13    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA A100-SXM...  Off  | 00000000:00:04.0 Off |                    0 |
| N/A   33C    P0    52W / 400W |      0MiB / 40960MiB |     27%      Default |
|                               |                      |             Disabled |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ conda install -c conda-forge cudatoolkit=11.8.0
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 23.1.0
  latest version: 23.3.1

Please update conda by running

    $ conda update -n base -c defaults conda

Or to minimize the number of packages updated during conda update use

     conda install conda=23.3.1



# All requested packages already installed.

(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ pip install nvidia-cudnn-cu11==8.6.0.163
Requirement already satisfied: nvidia-cudnn-cu11==8.6.0.163 in ./miniconda3/envs/tf/lib/python3.9/site-packages (8.6.0.163)
Requirement already satisfied: nvidia-cublas-cu11 in ./miniconda3/envs/tf/lib/python3.9/site-packages (from nvidia-cudnn-cu11==8.6.0.163) (11.11.3.6)
(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))
(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib
(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ mkdir -p $CONDA_PREFIX/etc/conda/activate.d
(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
(tf) suryanarayanay@surya-ubuntu22-cuda-test:~$ python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2023-04-21 06:12:14.343689: I tensorflow/core/util/port.cc:110] 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`.
2023-04-21 06:12:14.400436: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-04-21 06:12:15.255386: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
```

Request you to stick to tested configurations and let us know if the problem persists with those also. Thanks! Ok then why has it failed with me even though I have done the exact same tests?

Just FYI, Anaconda is just like Python as said previously. I would absolutely love a system like yours. This comes straight from following your instructions as well as TensorFlows:

``pip3 install nvidia cudnn-cu11==8.6.0.163
ERROR: Could not find a version that satisfies the requirement nvidia (from versions: none)
ERROR: No matching distribution found for nvidia`` Why does the above command posted only work as the root user in a Python3.9 Anaconda activated environment? Hi @NickDeBeenAIE ,

I can able to download the cudnn-cu11==8.6.0.163 even in base environment on Ubuntu VM with X86-64 architecture and logs attached below.

```
suryanarayanay@surya-ubuntu22-cuda-test:~$ pip install nvidia-cudnn-cu11==8.6.0.163
Defaulting to user installation because normal site-packages is not writeable
Collecting nvidia-cudnn-cu11==8.6.0.163
  Using cached nvidia_cudnn_cu11-8.6.0.163-py3-none-manylinux1_x86_64.whl (715.7 MB)
Collecting nvidia-cublas-cu11
  Using cached nvidia_cublas_cu11-11.11.3.6-py3-none-manylinux1_x86_64.whl (417.9 MB)
Installing collected packages: nvidia-cublas-cu11, nvidia-cudnn-cu11
Successfully installed nvidia-cublas-cu11-11.11.3.6 nvidia-cudnn-cu11-8.6.0.163

suryanarayanay@surya-ubuntu22-cuda-test:~$ uname
Linux
suryanarayanay@surya-ubuntu22-cuda-test:~$ uname -m
x86_64
```

When I checked it on Mac M1 i found the reported error as you. This might be due to the fact that Mac M1 has Arm Architecture and probably there is no corresponding pip wheel for nvidia-cudnn-cu11==8.6.0.163.

```
suryanarayanay-macbookpro:~ suryanarayanay$ pip install nvidia-cudnn-cu11==8.6.0.163
ERROR: Could not find a version that satisfies the requirement nvidia-cudnn-cu11==8.6.0.163 (from versions: 0.0.1.dev5)
ERROR: No matching distribution found for nvidia-cudnn-cu11==8.6.0.163

[notice] A new release of pip is available: 23.0 -> 23.1.2
[notice] To update, run: python3.10 -m pip install --upgrade pip
suryanarayanay-macbookpro:~ suryanarayanay$ uname
Darwin
suryanarayanay-macbookpro:~ suryanarayanay$ uname -m
arm64
suryanarayanay-macbookpro:~ suryanarayanay$ 
```

Can you confirm the architecture of your system using command `uname -m`. 

Secondly all the official instructions for CUDA and cuDNN path setting are linked to Conda environment. 

Thanks
 ``uname -m`` Returns the same architecture as you. Plus, I have to use a virtual environment to build the same nvidia-cudnn-cu11==8.6.0.163 package as you, but an earlier version was installed, 8.5.0 in my case.

But, it seems to have run, its just relying on code that is deprecated when running my G.A.N. script:

<pre>python3 Remasterer.py
Epoch 1/10
469/469 [==============================] - 2s 2ms/step - loss: 0.3517 - accuracy: 0.8991 - val_loss: 0.2061 - val_accuracy: 0.9383
Epoch 2/10
469/469 [==============================] - 1s 2ms/step - loss: 0.1788 - accuracy: 0.9480 - val_loss: 0.1503 - val_accuracy: 0.9539
Epoch 3/10
469/469 [==============================] - 1s 2ms/step - loss: 0.1298 - accuracy: 0.9612 - val_loss: 0.1310 - val_accuracy: 0.9601
Epoch 4/10
469/469 [==============================] - 1s 2ms/step - loss: 0.1019 - accuracy: 0.9692 - val_loss: 0.1030 - val_accuracy: 0.9688
Epoch 5/10
469/469 [==============================] - 1s 2ms/step - loss: 0.0848 - accuracy: 0.9735 - val_loss: 0.1042 - val_accuracy: 0.9677
Epoch 6/10
469/469 [==============================] - 1s 2ms/step - loss: 0.0719 - accuracy: 0.9776 - val_loss: 0.1011 - val_accuracy: 0.9683
Epoch 7/10
469/469 [==============================] - 1s 2ms/step - loss: 0.0612 - accuracy: 0.9809 - val_loss: 0.0838 - val_accuracy: 0.9742
Epoch 8/10
469/469 [==============================] - 1s 2ms/step - loss: 0.0528 - accuracy: 0.9836 - val_loss: 0.0915 - val_accuracy: 0.9711
Epoch 9/10
469/469 [==============================] - 1s 2ms/step - loss: 0.0459 - accuracy: 0.9857 - val_loss: 0.0978 - val_accuracy: 0.9689
Epoch 10/10
469/469 [==============================] - 1s 2ms/step - loss: 0.0412 - accuracy: 0.9869 - val_loss: 0.0906 - val_accuracy: 0.9719
313/313 [==============================] - 0s 685us/step - loss: 0.0906 - accuracy: 0.9719
Test accuracy: 0.9718999862670898
WARNING:absl:`lr` is deprecated in Keras optimizer, please use `learning_rate` or use the legacy optimizer, e.g.,tf.keras.optimizers.legacy.Adam.
Traceback (most recent call last):
  File &quot;/home/dbts2023/Desktop/venv/Remasterer.py&quot;, line 171, in &lt;module&gt;
    gan.add(discriminator)
  File &quot;/root/anaconda3/envs/tf/lib/python3.9/site-packages/tensorflow/python/trackable/base.py&quot;, line 205, in _method_wrapper
    result = method(self, *args, **kwargs)
  File &quot;/root/anaconda3/envs/tf/lib/python3.9/site-packages/keras/utils/traceback_utils.py&quot;, line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File &quot;/root/anaconda3/envs/tf/lib/python3.9/site-packages/keras/engine/input_spec.py&quot;, line 280, in assert_input_compatibility
    raise ValueError(
ValueError: Exception encountered when calling layer &quot;sequential_4&quot; (type Sequential).

Input 0 of layer &quot;conv2d_2&quot; is incompatible with the layer: expected axis -1 of input shape to have value 128, but received input with shape (None, 28, 28, 3)

Call arguments received by layer &quot;sequential_4&quot; (type Sequential):
  • inputs=tf.Tensor(shape=(None, 28, 28, 3), dtype=float32)
  • training=None
  • mask=None
</pre> On my specific system, as it has a s***ty GPU, it runs in a much earlier version of Python environment as root as you can see.

My issues now renewed by the fact that it needs developers like yourself to fix the Python code that I wrote:

<pre>import os
import numpy as np
from PIL import Image

os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
import requests
import tensorflow as tf
import random
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.optimizers import Adam
from keras.models import Sequential
from keras.layers import Dense
def load_image_batch(batch_size, image_size, directory):
# Load images from the directory
images = []
for filename in os.listdir(directory):
img = Image.open(os.path.join(directory, filename))
img = img.convert("RGB")
img = img.resize((image_size, image_size), Image.BICUBIC)
images.append(np.array(img))
images = np.array(images)


# Define the Discriminator class
class Discriminator(keras.Model):
    def __init__(self, img_shape):
        super(Discriminator, self).__init__()

        self.model = keras.Sequential([
            keras.layers.Flatten(input_shape=img_shape),
            keras.layers.Dense(512, activation='relu'),
            keras.layers.Dense(256, activation='relu'),
            keras.layers.Dense(1, activation='sigmoid')
        ])

    def call(self, x):
        validity = self.model(x)

        return validity


def load_image_batch(batch_size, image_size, directory):
    # Load images from the directory
    images = []
    for filename in os.listdir(directory):
        img = Image.open(os.path.join(directory, filename))
        img = img.convert("RGB")
        img = img.resize((image_size, image_size), Image.BICUBIC)
        images.append(np.array(img))
    images = np.array(images)

    # Normalize pixel values to [-1, 1]
    images = (images.astype(np.float32) - 127.5) / 127.5

    # Select a random batch of images
    indices = np.random.randint(0, images.shape[0], batch_size)
    batch = images[indices]

    return batch


# Generator model
def make_generator_model():
    model = keras.Sequential()
    model.add(layers.Dense(7 * 7 * 256, use_bias=False, input_shape=(100,)))
    model.add(layers.BatchNormalization())
    model.add(layers.LeakyReLU())

    model.add(layers.Reshape((7, 7, 256)))
    model.add(layers.Conv2DTranspose(128, (5, 5), strides=(1, 1), padding="same", use_bias=False))
    model.add(layers.BatchNormalization())
    model.add(layers.LeakyReLU())

    model.add(layers.Conv2DTranspose(64, (5, 5), strides=(2, 2), padding="same", use_bias=False))
    model.add(layers.BatchNormalization())
    model.add(layers.LeakyReLU())

    model.add(layers.Conv2DTranspose(3, (5, 5), strides=(2, 2), padding="same", use_bias=False, activation="tanh"))
    img_shape = (28, 28, 1)
    discriminator = Discriminator(img_shape=img_shape)
    return model


# Discriminator model
def make_discriminator_model():
    model = keras.Sequential()
    model.add(layers.Conv2D(64, (5, 5), strides=(2, 2), padding="same", input_shape=[64, 64, 3]))
    model.add(layers.LeakyReLU())
    model.add(layers.Dropout(0.3))

    model.add(layers.Conv2D(128, (5, 5), strides=(2, 2), padding="same"))
    model.add(layers.LeakyReLU())
    model.add(layers.Dropout(0.3))

    model.add(layers.Flatten())
    model.add(layers.Dense(1))

    return model


# Define the generator and discriminator models
generator = make_generator_model()
discriminator = make_discriminator_model()

# Compile the discriminator model
discriminator.compile(loss="binary_crossentropy", optimizer=Adam(lr=0.0002, beta_1=0.5))

# Combine the generator and discriminator models into a GAN
gan = keras.Sequential()
gan.add(generator)
gan.add(discriminator)

# Compile the GAN model
gan.compile(loss="binary_crossentropy", optimizer=Adam(lr=0.0002, beta_1=0.5))

# Train the GAN
batch_size = 32
epochs = 100
directory = "/Insert/Directory/Of_both_your_Python_Code_Location/And_Images_Here"
image_size = 64
training_images = load_image_batch(batch_size, image_size, directory)
steps_per_epoch = len(training_images) // batch_size

for epoch in range(epochs):
    # set model to training mode
    model.train()

# initialize training loss and number of training batches
train_loss = 0
num_batches = 0

# loop over training data in batches
for inputs, labels in train_loader:
    # move inputs and labels to device
    inputs = inputs.to(device)
    labels = labels.to(device)

    # zero the parameter gradients
    optimizer.zero_grad()

    # forward pass
    outputs = model(inputs)

    # calculate loss
    loss = criterion(outputs, labels)

    # backward pass and optimization
    loss.backward()
    optimizer.step()

    # update training loss and number of batches
    train_loss += loss.item()
    num_batches += 1

# calculate average training loss
train_loss /= num_batches

# set model to evaluation mode
model.eval()

# initialize validation loss and number of validation batches
val_loss = 0
num_val_batches = 0

# turn off gradient calculation for validation
with torch.no_grad():
    # loop over validation data in batches
    for val_inputs, val_labels in val_loader:
        # move inputs and labels to device
        val_inputs = val_inputs.to(device)
        val_labels = val_labels.to(device)

        # forward pass
        val_outputs = model(val_inputs)

        # calculate loss
        val_loss += criterion(val_outputs, val_labels).item()
        num_val_batches += 1

# calculate average validation loss
val_loss /= num_val_batches

# print training and validation loss for each epoch
print(f"Epoch {epoch + 1}/{epochs}, Training Loss: {train_loss:.4f}, Validation Loss: {val_loss:.4f}")

# at the end of each epoch, save the model
torch.save(model.state_dict(), f"model_{epoch + 1}.pt")
<pre> 

> `uname -m` Returns the same architecture as you.

Please confirm the output result. Is it X86_64 or Arm ?





> pip3 install nvidia cudnn-cu11==8.6.0.163 ERROR: Could not find a version that satisfies the requirement nvidia (from versions: none) ERROR: No matching distribution found for nvidia

Did you able to resolve the above error now ?

Can you confirm whether now GPU is able to detectable ?

There are multiple issues being discussed. First of all let us complete one by one. Please confirm the reply to the above queries.



 I already confirmed this with you via ``nvidia-smi`` and ``uname -r``.

This system is not compatible with the version of cudnn your using.

It installed cudnn version 8.5.0.96 as per pascel GPU.

If I swapped out the GT 1030 with an RTX A2000, it would install cudnn version 8.6.0.163 without issue.

Moving on.

I cannot seem to figure out why my script just refuses to see the 1030 when, like I said previously, ``nvidia-smi`` can. @NickDeBeenAIE ,

With RTX A2000 you are able to use this GPU ?

`nvidia-smi` command is not related to Tensorflow.It outputs Driver version, CUDA toolkit version it is compatible and also GPUs on local machine. For Tensorflow to detect GPU first we should ensure whether Nvidia driver is able to detect GPU.

For Tensorflow to detect GPU we should follow the instructions for GPU setup as mentioned in documentation. So both are two different things. Well, quit taking me around in circles.

I followed all of the instructions in the guide.

I was saying that my script wouldn't have had an issue if I had an RTX A2000 in the first place. Not sure but it may be due to compatibility issue between GT 1030 and CUDA or cuDNN version or GT1030 GPU might not be supported.

@nitins17 - Do you have any pointers here ? Huh, I see what my issue is here:

I technically have 2 GPU's in my machine, and Tensorflow may be seeing the wrong one.

GPU0: Intel HD 635 iGPU thats in the CPU itself.

GPU1: Nvidia GT1030 2GB.

Huh, even if the script is updated with:

os.environ["CUDA_VISIBLE_DEVICES"] = "1"

instead of os.environ["CUDA_VISIBLE_DEVICES"] = "0" it still fails.

And it still failed with the quotations removed from CUDA_VISIBLE_DEVICES and TF_CPP_MIN_LOG_LEVEL.

``2023-05-23 14:23:20.131376: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-05-23 14:23:20.166114: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-05-23 14:23:20.166452: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-05-23 14:23:20.819630: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2023-05-23 14:23:21.647132: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:996] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2023-05-23 14:23:21.673109: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1956] 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...`` Hi @NickDeBeenAIE ,

First you can use the API tf.config.list_physical_devices('GPU') to list out the physical devices.Then If you want to set only specific GPU visible to Tensorflow then you can use the API `tf.config.set_visible_devices()`

Below is example code for ignoring 1st GPU and making remaining all visible to Tensorflow.

`tf.config.set_visible_devices(physical_devices[1:], 'GPU')`

Please try this and let us know if ot works.

Thanks! I tried this and TensorFlow is so blind it cannot see my 1030.
<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Support

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

2.25.1

### Custom Code

Yes

### OS Platform and Distribution

Linux, Ubuntu 22.04.6

### Mobile device

_No response_

### Python version

Python 3.11

### Bazel version

N/A*

### GCC/Compiler version

11.2

### CUDA/cuDNN version

12

### GPU model and memory

Nvidia GT 1030 2gb

### Current Behaviour?

<pre>``2023-05-05 02:37:58.234754: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-05-05 02:37:58.270803: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-05-05 02:37:58.271133: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-05-05 02:37:58.944800: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2023-05-05 02:37:59.878527: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:996] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2023-05-05 02:37:59.878936: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1956] 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...``<pre>

### Standalone code to reproduce the issue

```shell
The above is the response every time even though the GPU exists in the PC.

The GT 1030 might not be the most powerful GPU out there, but it does have 344 Cuda Cores.

I also have the Cuda Toolkit installed, along with the latest drivers available (I'm surprised this card is still getting support).

To reproduce,run the following command in the terminal: ``python3 insert script name here.py (replace with the name of your .py script).

The output will tell you what has happened.

Just FYI, this also affects AMD Radeon Pro WX 5, 6 and 7000 series GPU's and their gaming variants i.e., my RX 6700 XT in this case running in WSL 1.

Godspeed.
```


### Relevant log output

_No response_</details>