-
Notifications
You must be signed in to change notification settings - Fork 796
NXP backend: added Squeeze support #16540
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
base: main
Are you sure you want to change the base?
NXP backend: added Squeeze support #16540
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16540
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ebf1adc with merge base 7793b1d ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: nxp" |
|
@pytorchbot label "module: nxp" |
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.
Pull request overview
This pull request adds support for the "Squeeze" operator in the NXP backend by implementing a pass that converts squeeze operations to view operations.
Changes:
- Added
ConvertSqueezeToViewPassclass that transformsaten.squeezeoperations intoaten.viewoperations - Integrated the new pass into
NeutronAtenPassManager - Added
SqueezeAddModeltest model and comprehensive test suite covering various squeeze scenarios
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| backends/nxp/aten_passes/convert_squeeze_to_view.py | Implements the pass to convert squeeze operations to view operations, following the same pattern as the existing unsqueeze pass |
| backends/nxp/aten_passes/neutron_aten_pass_manager.py | Integrates ConvertSqueezeToViewPass into the pass manager and updates copyright year |
| backends/nxp/tests/models.py | Adds SqueezeAddModel test helper class for testing squeeze operations |
| backends/nxp/tests/test_convert_squeeze_to_view.py | Comprehensive test suite covering squeeze with None dim, specific dims, negative dims, lists/tuples, and partial/full dimension overlaps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
67fb8ba to
ebf1adc
Compare
Summary
adds support for "Squeeze" operator
Test plan
tests can be manually run using
pytest -c /dev/null backends/nxp/tests/cc @robert-kalmar @JakeStevens @digantdesai @MartinPavella