-
Notifications
You must be signed in to change notification settings - Fork 610
[TORCH][MLIR] Add E2E support for aten.native_layer_norm_backward op.
#570
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
[TORCH][MLIR] Add E2E support for aten.native_layer_norm_backward op.
#570
Conversation
This commit fixs the lowering of `aten.native_layer_norm` operation. Previously this operation was not calculating correct shapes for mean and inverted STD. This has been corrected in this commit. Some new helper functions are added to calculate the inverted STD and to broadcast a given input with the help of a broadcast mask. Signed-Off-By: Prateek Gupta <prateek@nod-labs.com>
This commit adds support for `aten.native_layer_norm_backward` operation. It also adds support for matching constant bools stored in a boolean list. Signed-Off-By: Prateek Gupta <prateek@nod-labs.com>
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 would recommend implementing this in DecomposeComplexOps if possible. Math calculation in DecomposeComplexOps are easier to implement and more readable and maintainable.
|
@cathyzhyi I have added a PR for this decomposition in functorch: pytorch/functorch#525 |
@gprateek93 After the decomposition is merged can you add an e2e test to make sure it would make |
|
The functorch PR for |
|
Hey are there any updates on this PR? We seem to have support for Ideally we'd like to have cc: @antoniojkim @ke1337 |
|
FYI: I'm working on a new PR that will borrow some code from this one (with credits and reference), since I need support for |
(trivial drive-by fix) Co-authored-by: Alexandre Eichenberger <alexe@us.ibm.com> Co-authored-by: Kevin O'Brien <caomhin@us.ibm.com>
|
This PR can be closed, seems #888 is merged to add aten.native_layer_norm_backward op. |
This PR adds two commits:
aten.native_layer_norm_backwardoperation. It also adds support for matching constant bools stored in a boolean list.aten.native_layer_norm. Previously this operation was not calculating correct shapes for mean and inverted STD. This has been corrected in this commit. Some new helper functions are added to calculate the inverted STD and to broadcast a given input with the help of a broadcast mask.Signed-Off-By: Prateek Gupta prateek@nod-labs.com