[TORCH] Add support for aten.absolute op via torch decomposition#4624
Open
AiyyappanMR wants to merge 2 commits into
Open
[TORCH] Add support for aten.absolute op via torch decomposition#4624AiyyappanMR wants to merge 2 commits into
AiyyappanMR wants to merge 2 commits into
Conversation
Author
|
Hi @zjgarvey and @penguin-wwy, I'm a first-time contributor. Could either of you trigger the CI pipeline for this PR, or point me to someone who can? Also happy to get a code review whenever someone has time. Thanks! |
Collaborator
|
please resolve conflicts |
Author
|
Hi @penguin-wwy, I've resolved the merge conflicts and pushed the update. Please let me know if anything else is needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
torch.absoluteis an alias fortorch.absbut is not registered in the torch dialect. It arrives as an unregisteredtorch.operator "torch.aten.absolute"which fails legalization when lowering to backend contract.On testing via fx_importer:
./projects/pt1/tools/e2e_test.sh --config=fx_importer -f ElementwiseAbsolute
TorchFX IR:
%0 = "torch.operator"(%arg0) <{name = "torch.aten.absolute"}> : (!torch.vtensor<[1,1,3],f32>) -> !torch.vtensor<[1,1,3],f32>
error: failed to legalize operation 'torch.operator' that was explicitly marked illegal
This PR adds support by:
aten::absoluteintorch_ods_gen.pyand regeneratingGeneratedTorchOps.tdabstract_interp_lib_gen.pyand regeneratingAbstractInterpLibrary.cppDecomposeAtenAbsoluteOpinDecomposeComplexOps.cppwhich decomposes toAtenAbsOp