tf.experimental.dtensor.copy_to_mesh

Copies a tf.Tensor onto the DTensor device with the given layout.

Used in the notebooks

Used in the guideUsed in the tutorials

Copies a regular tf.Tensor onto the DTensor device. Use the mesh attached to layout as target mesh. This method currently only supports replicated layouts, or one-to-one copies for sharded layouts.

tensorA regular tf.Tensor to be copied as a DTensor.
layoutTarget layout (and mesh) for the result DTensor.
source_layoutSource layout of the tensor before copy. This argument is deprecated.

A DTensor on the DTensor device with the given layout.