-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Auto Parallel] Completion Dist Attribute for Backward & Update stage #36744
[Auto Parallel] Completion Dist Attribute for Backward & Update stage #36744
Conversation
Thanks for your contribution! |
✅ This PR's description meets the template requirements! |
output_var_attr = TensorDistributedAttribute(output_var, | ||
dist_context) | ||
output_var_attr.set_dims_mapping(ref_dims_mapping) | ||
output_var_attr.set_process_mesh(ref_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.
the grad var process mesh should be the same with grad op instead of forward var?
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.
yes, here is a bug and had been 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.
I have tested this for the new implementation and it works well for me now. In the future, we should give clear and reasonable rules to complete these distributed attributes for the backward and update tensors and ops.
# var | ||
for output_name in grad_op.desc.output_names(): | ||
assert len(grad_op.desc.output(output_name)) in [0, 1] | ||
# if grad_op.type == "cast": |
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.
没用可以干掉
…PaddlePaddle#36744) * revise completion for backward * revise completion for update * revise completion for update * update unitest
PR types
Function optimization
PR changes
Others
Describe
Completion Dist Attribute for Backward & Update stage
Make sure all op and var have Dist Attribute