-
Notifications
You must be signed in to change notification settings - Fork 583
Arm backend: Support for dynamic shapes and fix resize bugs #11310
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
Dynamic shapes are detected when converting torch shapes to TOSA shapes, when they contain SymInts rather than regular ints. These are converted to -1s as this is how TOSA represents dynamic shapes. The resize op needs special handling for dynamic shapes, and will only work when all of the TOSA parameters (scale n/d, offset, border) work out to be constant values independent of the shape. Also fix bug where align_corners was always set to True, when it should be False Signed-off-by: Richard Burton <[email protected]> Change-Id: Ibce3d5f8d62b3c450a00e5b61975d3cf97ff2c69
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11310
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit fc97a9b with merge base a69e28e ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label ciflow/trunk |
To add these label(s) (ciflow/trunk) to the PR, please first approve the workflows that are awaiting approval (scroll to the bottom of this page). This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
This PR caused a strange lintrunner error so I rebased it to check if it helped. |
@Burton2000 unfortunately it didn't help, it seems this PR cause some lint problems. Without looking at it it might be that one of you changes in a generic class get error when used so if you tests locally you might not see it if you only check changed files in the patch e.g. you might need to use lintrunner without args if you used something like |
Change-Id: I269a9d1dd789bd866eaa46b641fee47ba231b8fc
Looking better now? |
Yes but there is a fail in a Arm backend test now :( |
It was |
MacOS fails are unrelated as this delegate don't build or run on it. |
Dynamic shapes are detected when converting torch shapes to TOSA shapes, when they contain SymInts rather than regular ints. These are converted to -1s as this is how TOSA represents dynamic shapes.
The resize op needs special handling for dynamic shapes, and will only work when all of the TOSA parameters (scale n/d, offset, border) work out to be constant values independent of the shape.
Also fix bug where align_corners was always set to True, when it should be False
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218
Signed-off-by: Richard Burton [email protected]
Co-authored-by: Robert Hughes @Rob-Hughes-Arm