# tf.tpu.core

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/tpu/tpu.py#L153-L163) |

Returns the device name for a core in a replicated TPU computation.

#### View aliases


**Main aliases**

\`tf.contrib.tpu.core\`
**Compat aliases for migration**

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

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

<br />

    tf.tpu.core(
        num
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `num` | the virtual core number within each replica to which operators should be assigned. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A device name, suitable for passing to [`tf.device()`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/device). ||

<br />