# tf.config.LogicalDevice

<br />

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

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.1/api_docs/python/tf/config/LogicalDevice) corresponds to an initialized logical device on a
[`tf.config.PhysicalDevice`](https://www.tensorflow.org/versions/r2.1/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.1/api_docs/python/tf/device) with a specified [`tf.config.LogicalDevice`](https://www.tensorflow.org/versions/r2.1/api_docs/python/tf/config/LogicalDevice).

#### 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 />

| ## Attributes ||
|---|---|
| `name` | <br /> <br /> |
| `device_type` | <br /> <br /> |

<br />