tf.experimental.dtensor.copy_to_mesh
Stay organized with collections
Save and categorize content based on your preferences.
Copies a tf.Tensor onto the DTensor device with the given layout.
tf.experimental.dtensor.copy_to_mesh(
tensor: Any,
layout: tf.experimental.dtensor.Layout
,
source_layout: Optional[tf.experimental.dtensor.Layout
] = None
) -> tf.Tensor
Used in the notebooks
Used in the guide |
Used 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.
Args |
tensor
|
A regular tf.Tensor to be copied as a DTensor.
|
layout
|
Target layout (and mesh) for the result DTensor.
|
source_layout
|
Source layout of the tensor before copy. This argument
is deprecated.
|
Returns |
A DTensor on the DTensor device with the given layout.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-04-26 UTC.",
"confidential": False
}