# tf.config.LogicalDevice

<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#L288-L303) |

Abstraction for a logical device initialized by the runtime.

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.config.LogicalDevice(
        name, device_type
    )

A [`tf.config.LogicalDevice`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/LogicalDevice) corresponds to an initialized logical device on a
[`tf.config.PhysicalDevice`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/PhysicalDevice) or a remote device visible to the cluster. Tensors
and operations can be placed on a specific logical device by calling
[`tf.device`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/device) with a specified [`tf.config.LogicalDevice`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/config/LogicalDevice).

<br />

<br />

<br />

| ## Fields ||
|---|---|
| `name` | The fully qualified name of the device. Can be used for Op or function placement. |
| `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 />