-
Notifications
You must be signed in to change notification settings - Fork 607
Add support for torch.pow in the Arm backend #9309
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9309
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit 5379416 with merge base feb3fcd ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
@pytorchbot label "partner: arm" |
@pytorchbot label ciflow/trunk |
6b8a46f
to
446fe7f
Compare
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, thanks.
@digantdesai I have updated this PR so you might want to check it again. |
Rebase? |
@digantdesai I'm on it. Had some test failures after rebasing locally but the patch is on it's way. |
Implement support for torch.pow in the MI and BI profile of TOSA. For MI, the operator works as Pytorch's reference implementation except for that the base operand cannot be a scalar but must be a tensor. For BI, the exponent operand must be a scalar and a constant value. The base operand must be a tensor. Split the ReplaceScalarWithTensorArgsPass into two subclasses: one for MI and one for BI. For MI, the pow operator's exponent will converted to a tensor in case it is a scalar. For BI, the scalar will be kept, but instead it will be consumed in the InsertTableOpsPass, meaning that the operator will be converted into a table operation with one input and output. This still enforces the exponent to be constant for the BI profile. Change-Id: I464ab91ff46c0a6ad28d0fb84735a403a74e6323
Co-authored-by: Martin Lindström <[email protected]>
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218