-
Notifications
You must be signed in to change notification settings - Fork 820
Arm backend: Add support for clamp.Tensor #16273
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/16273
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 2 Unrelated FailuresAs of commit f4183b4 with merge base df626bd ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Decompose aten.clamp.Tensor to a chain of minimum/maximum operations, since TOSA clamp only supports scalar min/max bounds. This change: - Rename DecomposeInt32ClampPass to DecomposeTOSAUnsupportedClampPass - Extend the pass to handle aten.clamp.Tensor variants already annotated by ArmQuantizer - Mark aten.clamp.Tensor as supported in the TOSA operator support lists - Fix clamp decomposition to apply max with the lower bound, then min with the upper bound (y_i = min(max(x_i, min_i), max_i)), matching torch.clamp semantics even when min > max Change-Id: Iee52062599c1ef58421bc772a47b165646de435c Signed-off-by: Yufeng Shi <yufeng.shi@arm.com> Co-authored-by: Ryan O'Shea <ryan.oshea3@arm.com> Co-authored-by: Oscar Andersson <oscar.andersson@arm.com>
|
Issues around lifted tensor constants have been fixed in this PR #16274 |
|
This got a merge conflict in process_node.py and need a rebase. |
efb206b to
a6182b2
Compare
|
Failed tests are unrelated |
Decompose aten.clamp.Tensor to a chain of minimum/maximum operations, since TOSA clamp only supports scalar min/max bounds. This change: - Rename DecomposeInt32ClampPass to DecomposeTOSAUnsupportedClampPass - Extend the pass to handle aten.clamp.Tensor variants already annotated by ArmQuantizer - Mark aten.clamp.Tensor as supported in the TOSA operator support lists - Fix clamp decomposition to apply max with the lower bound, then min with the upper bound (y_i = min(max(x_i, min_i), max_i)), matching torch.clamp semantics even when min > max - Align the memory layout of lifted tensor constants in process_inputs_to_lifted_tensor_constants with the TOSA memory format Signed-off-by: Yufeng Shi <yufeng.shi@arm.com> Co-authored-by: Ryan O'Shea <ryan.oshea3@arm.com> Co-authored-by: Oscar Andersson <oscar.andersson@arm.com>
Decompose aten.clamp.Tensor to a chain of minimum/maximum operations, since TOSA clamp only supports scalar min/max bounds. This change: - Rename DecomposeInt32ClampPass to DecomposeTOSAUnsupportedClampPass - Extend the pass to handle aten.clamp.Tensor variants already annotated by ArmQuantizer - Mark aten.clamp.Tensor as supported in the TOSA operator support lists - Fix clamp decomposition to apply max with the lower bound, then min with the upper bound (y_i = min(max(x_i, min_i), max_i)), matching torch.clamp semantics even when min > max - Align the memory layout of lifted tensor constants in process_inputs_to_lifted_tensor_constants with the TOSA memory format Signed-off-by: Yufeng Shi <yufeng.shi@arm.com> Co-authored-by: Ryan O'Shea <ryan.oshea3@arm.com> Co-authored-by: Oscar Andersson <oscar.andersson@arm.com>
Decompose aten.clamp.Tensor to a chain of minimum/maximum operations, since TOSA clamp only supports scalar min/max bounds.
This change:
Change-Id: Iee52062599c1ef58421bc772a47b165646de435c
cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai