# tf.config.PhysicalDevice

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/eager/context.py#L343-L365) |

Abstraction for a locally visible physical device.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.config.PhysicalDevice`](https://www.tensorflow.org/api_docs/python/tf/config/PhysicalDevice)

<br />

    tf.config.PhysicalDevice(
        name, device_type
    )

TensorFlow can utilize various devices such as the CPU or multiple GPUs
for computation. Before initializing a local device for use, the user can
customize certain properties of the device such as it's visibility or memory
configuration.

Once a visible [`tf.config.PhysicalDevice`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/PhysicalDevice) is initialized one or more
[`tf.config.LogicalDevice`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/LogicalDevice) objects are created. Use
[`tf.config.set_visible_devices`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/set_visible_devices) to configure the visibility of a physical
device and [`tf.config.set_logical_device_configuration`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/set_logical_device_configuration) to configure multiple
[`tf.config.LogicalDevice`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/LogicalDevice) objects for a [`tf.config.PhysicalDevice`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/PhysicalDevice). This is
useful when separation between models is needed or to simulate a multi-device
environment.

<br />

<br />

<br />

| ## Fields ||
|---|---|
| `name` | Unique identifier for device. |
| `device_type` | String declaring the type of device such as "CPU" or "GPU". |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `name` | A `namedtuple` alias for field number 0 |
| `device_type` | A `namedtuple` alias for field number 1 |

<br />