Error starting Tensorflow in Python
@nnagarajan ,

For enabling GPU you need to follow additional instructions mentioned in documentation [here](https://www.tensorflow.org/install/pip#linux).

Please check and if you still have issue the let us know.Thanks! Thank you for the instructions @SuryanarayanaY , missed to install cudatookit. After installing the toolkit TF, can now recognize the GPU but there are couple of warnings, 

1. TF using CPU optimization
```
This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
```
2. NUMA not available
```
successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
```

Looking for suggestions to resolve these warnings as well. 



```
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2023-08-28 12:46:34.327130: 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-08-28 12:46:34.351325: 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 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-08-28 12:46:34.723738: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2023-08-28 12:46:35.245761: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:995] 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-08-28 12:46:35.260189: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:995] 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-08-28 12:46:35.260380: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:995] 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
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
``` Hi @nnagarajan ,

> ```
> This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
> ```

This is not warning. This is just information giving to user that the binaries are optimized for CPU to give better performance.

> ```
> successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
> ```

This is just a warning not an error and should not affect TF. To get rid of this warning you can refer the attached [source](https://github.com/tensorflow/tensorflow/issues/42738#issuecomment-922422874).

Alternatively you can use the below command to suppress the warnings.

```
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
```

Thanks! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61688">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61688">No</a>
 ![微信截图_20231221172531](https://github.com/tensorflow/tensorflow/assets/150895609/5253d621-f60c-4738-8346-b2a1953fd0bf)
I had a similar problem, but installing cudatoolkit = 11.8 in the environment didn't solve it. 
 > ![微信截图_20231221172531](https://private-user-images.githubusercontent.com/150895609/292157753-5253d621-f60c-4738-8346-b2a1953fd0bf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMxNTExNDcsIm5iZiI6MTcwMzE1MDg0NywicGF0aCI6Ii8xNTA4OTU2MDkvMjkyMTU3NzUzLTUyNTNkNjIxLWY2MGMtNDczOC04MzQ2LWIyYTE5NTNmZDBiZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBSVdOSllBWDRDU1ZFSDUzQSUyRjIwMjMxMjIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDIzMTIyMVQwOTI3MjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yZWFiZjU5ZDBlYTM4NzI1MmZiNDA4ZTAyYmZkMjVlZmNlOGJjNDdiNGYwZjJkZjI0ZDU4NmZiNDBhZTJlMTRkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.5eEzAmy557YWhfochLlmWa-Gdr354J-B2fF9MgEJHk0) I had a similar problem, but installing cudatoolkit = 11.8 in the environment didn't solve it.

my env: python 3.10  cuda 12.2  cudatoolkit 11.8.0 I Am Running On Cpu And getting The Following Issue:


2023-12-30 12:06:56.760763: I tensorflow/core/util/port.cc:113] 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`.

with lots of other warnings 

i have tried env method but didn't work for me 
 > I Am Running On Cpu And getting The Following Issue:
> 
> 2023-12-30 12:06:56.760763: I tensorflow/core/util/port.cc:113] 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`.
> 
> with lots of other warnings
> 
> i have tried env method but didn't work for me

To turn off this warning you can set the environment variable `export TF_ENABLE_ONEDNN_OPTS=0`.
> 2023-12-30 12:06:56.760763: I tensorflow/core/util/port.cc:113] 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`. > > I Am Running On Cpu And getting The Following Issue:
> > 2023-12-30 12:06:56.760763: I tensorflow/core/util/port.cc:113] 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`.
> > with lots of other warnings
> > i have tried env method but didn't work for me
> 
> To turn off this warning you can set the environment variable `export TF_ENABLE_ONEDNN_OPTS=0`.
> 
> > 2023-12-30 12:06:56.760763: I tensorflow/core/util/port.cc:113] 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`.

How to set the environment variable?

### Issue type

Others

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

Yes

### Source

binary

### TensorFlow version

2.13.0

### Custom code

Yes

### OS platform and distribution

Rocky Linux 8.8

### Mobile device

_No response_

### Python version

3.9

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

12

### GPU model and memory

24 GB

### Current behavior?

Unable to load tensorflow in python with CUDA 12.2. Looking for some pointers

### Standalone code to reproduce the issue

```shell
pip install tensorflow
python
>>> import tensorflow as tf
 python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"                                                                                
2023-08-24 15:39:47.107770: 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-08-24 15:39:47.108805: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.                                                                          
2023-08-24 15:39:47.130307: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.                                                                          
2023-08-24 15:39:47.130612: 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 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.                                                                            
2023-08-24 15:39:47.496076: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT                                                                                      
2023-08-24 15:39:48.008342: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:995] 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-08-24 15:39:48.023762: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1960] 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...
[]
```


### Relevant log output

_No response_