# tf.config.experimental.get_device_policy

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/framework/config.py#L312-L337) |

Gets the current device policy.

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.config.experimental.get_device_policy()

The device policy controls how operations requiring inputs on a specific
device (e.g., on GPU:0) handle inputs on a different device (e.g. GPU:1).

This function only gets the device policy for the current thread. Any
subsequently started thread will again use the default policy.

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Current thread device policy ||

<br />