tf.config.list_physical_devices('CPU')
@jsxzhub,
Could you please try to execute the below mentioned code and you will get the output for the cpu devices which are available in the machine. 

```
import os
print("Number of physical CPUs:", os.cpu_count())
```

or 

```
import multiprocessing
multiprocessing.cpu_count()
```
Please find the below screenshot for the reference. Thank you!
![Screenshot 2023-05-15 4 41 17 PM](https://github.com/tensorflow/tensorflow/assets/81610181/e9e15e3b-f52e-43bc-8112-827bf510140c)
 ![image](https://github.com/tensorflow/tensorflow/assets/6895480/461ee918-8386-4fc4-9e57-96059db5c37b)

Is this tensorflow bug? 

How does TensorFlow utilize multiple CPUs in this situation? I think this is not an issue.  I don't believe that this is supposed to print the number of CPU cores.  I think it just prints the actual physical device.

`tf.config.list_physical_devices("CPU")`

Here is my output:

```
print(tf.config.list_physical_devices())

[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU'), PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
``` 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. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. 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/60595">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/60595">No</a>
 @jsxzhub,
**tf.config.list_physical_devices** will return a list of physical devices visible to the host runtime. Physical devices are hardware devices present on the host machine. By default all discovered CPU and GPU devices are considered visible.

This API allows querying the physical hardware resources prior to runtime initialization. Thus, giving an opportunity to call any additional configuration APIs. This is in contrast to [tf.config.list_logical_devices](https://www.tensorflow.org/api_docs/python/tf/config/list_logical_devices), which triggers runtime initialization in order to list the configured devices.

https://www.tensorflow.org/api_docs/python/tf/config/list_physical_devices
Thank you! That means the machine has 48 CPUs, but I can only use one CPU?
![image](https://github.com/tensorflow/tensorflow/assets/6895480/73b7fe76-f45d-4d4b-8a7b-043583165bdc)
 Hi, 

Both `os.cpu_count()` and `multiprocessing.cpu_count()` will give you the number of cores across all the CPUs in your machine.

`tf.config.list_physical_devices('CPU')` will return the physical CPU devices.

Tensorflow uses all the cores in the available CPU. 



![image](https://github.com/tensorflow/tensorflow/assets/73069040/1b6418fc-369a-4c6a-884e-7cae1b4b37aa)
 Thank you!
It is recommended that tensorflow be modified to display as many cpus as there are cpus.
for example:
PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU') 
PhysicalDevice(name='/physical_device:CPU:1', device_type='CPU')
 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/60595">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/60595">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

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

Yes

### Source

binary

### Tensorflow Version

v2.12.0

### Custom Code

Yes

### OS Platform and Distribution

Linux Debain 11

### Mobile device

_No response_

### Python version

3.9.2

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

"tf.config.list_physical_devices('CPU')" only show one CPU, but my machine has multiple CPUs. 

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

physical_devices = tf.config.list_physical_devices("CPU")
for device in physical_devices:
    print(device)
```


### Relevant log output

```shell
PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU')
```
</details>