Arm backend: Match arg ranks for min/max ops#16181
Arm backend: Match arg ranks for min/max ops#16181Sebastian-Larsson merged 4 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16181
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 Cancelled Jobs, 3 Unrelated FailuresAs of commit df5f098 with merge base 31aa8d3 ( CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but was 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. |
|
int32 clamp already does a full op to handle the rank difference. If this is not working properly you should add a test that triggers this error or if it is a replacement, you should remove the full op |
- Int32 clamp is decomposed into min/max, but input_tensor and min_arg/max_arg can end up with different ranks (e.g. (1,) vs ()) after subsequent passes. This violates the TOSA requirements for TOSA.MINIMUM and TOSA.MAXIMUM in the node visitors. - Fix this by matching the input ranks in MatchArgRanksPass Change-Id: I47a3bb73832ddc35553cd3e5b65085155eb9ca48 Signed-off-by: Yufeng Shi <yufeng.shi@arm.com> Co-authored-by: Ryan O'Shea <ryan.oshea3@arm.com> Co-authored-by: Rob Elliott <Robert.Elliott@arm.com>
e50aca5 to
b28d0a6
Compare
Hey Ryan, thanks for your comment. I realize This issue was found by some internal model tests and cannot be easily reproduced with an op test, but we have verified the fix against those internal models. Thank you! |
|
Arm tests might fail on test_index_tensor_tosa @oscarandersson8218 is working on a fix |
- Int32 clamp is decomposed into min/max, but input_tensor and min_arg/max_arg can end up with different ranks (e.g. (1,) vs ()) after subsequent passes. This violates the TOSA requirements for TOSA.MINIMUM and TOSA.MAXIMUM in the node visitors. - Fix this by matching the input ranks in MatchArgRanksPass Signed-off-by: Yufeng Shi <yufeng.shi@arm.com> Co-authored-by: Ryan O'Shea <ryan.oshea3@arm.com> Co-authored-by: Rob Elliott <Robert.Elliott@arm.com>
- Int32 clamp is decomposed into min/max, but input_tensor and min_arg/max_arg can end up with different ranks (e.g. (1,) vs ()) after subsequent passes. This violates the TOSA requirements for TOSA.MINIMUM and TOSA.MAXIMUM in the node visitors. - Fix this by matching the input ranks in MatchArgRanksPass Signed-off-by: Yufeng Shi <yufeng.shi@arm.com> Co-authored-by: Ryan O'Shea <ryan.oshea3@arm.com> Co-authored-by: Rob Elliott <Robert.Elliott@arm.com>
Change-Id: I47a3bb73832ddc35553cd3e5b65085155eb9ca48
cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai