-
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
[Semi Auto] Matmul & Embedding InferBackward Rule #56257
[Semi Auto] Matmul & Embedding InferBackward Rule #56257
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
|
||
# trans_x = true, trans_y = true, abmn[-1, -1, 0, 1] --> abmk[-1, -1, -1, 0], a1kn[-1, -1, 1, -1] | ||
self.out_dist_tensor_spec.shape = [512, 48, 64, 48] | ||
self.x_dist_tensor_spec.shape = [512, 48, 64, 32] |
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.
self.x_dist_tensor_spec.shape = [512, 48, 64, 32] | |
self.x_dist_tensor_spec.shape = [512, 48, 32, 64] | |
self.y_dist_tensor_spec.shape = [512, 1, 48, 32] |
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
# data parallel | ||
self.out_dist_tensor_spec.set_dims_mapping([1, -1, -1]) | ||
result_dist_attrs = self.rule1.infer_backward( | ||
[self.out_dist_tensor_spec], self.attrs |
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 inputs of infer_backward includes input_specs and output_specs
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
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
* add embedding backward rule * update backward api * revert api * matmul inferbackward * update unitest
PR types
Function optimization
PR changes
Others
Description
Pcard-70448
inferbackward rule for matmul & embedding