-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SemiAuto] add static branch for shard_tensor #56561
Conversation
Get process_mesh of the dist_attr | ||
|
||
Returns: | ||
paddle.distributed.ProcessMesh: process_mesh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还需要补充下示例吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉不加也可以,比较简单的property函数。如果需要,后续我补一下。
dims_mapping = [ | ||
mesh.dim_names.index(dim_name) if dim_name is not None else -1 | ||
for dim_name in sharding_specs | ||
] | ||
|
||
# 2. init core.TensorDistAttr | ||
core.TensorDistAttr.__init__(self) | ||
self.process_mesh = mesh | ||
self.dims_mapping = dims_mapping | ||
self._process_mesh = mesh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the process_mesh field in c++ TensorDistAttr might remain unchanged ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* shard_tensor support static graph * add comments * add dy2static ut * use property in c++ side
PR types
New features
PR changes
APIs
Description
add static branch for shard_tensor and support dy2static
Pcard-73145