Skip to content

Conversation

@novak-vaclav
Copy link
Contributor

@novak-vaclav novak-vaclav commented Jan 6, 2026

Summary

adds conversion and quantization of aten.unsqueeze

Test plan

tests can be manually run using pytest -c /dev/null backends/nxp/tests/

cc @robert-kalmar @JakeStevens @digantdesai @MartinPavella

Copilot AI review requested due to automatic review settings January 6, 2026 15:38
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 6, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16467

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Unrelated Failure

As of commit 81be94a with merge base e847384 (image):

NEW FAILURE - The following job has failed:

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.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 6, 2026
@novak-vaclav
Copy link
Contributor Author

@pytorchbot label "module: nxp"

@pytorch-bot pytorch-bot bot added the module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ label Jan 6, 2026
@novak-vaclav
Copy link
Contributor Author

@pytorchbot label "release notes: nxp"

@pytorch-bot pytorch-bot bot added the release notes: nxp Changes to the NXP Neutron backend delegate label Jan 6, 2026
Copy link
Contributor

Copilot AI left a 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 PR adds support for conversion and quantization of aten.unsqueeze operations in the NXP backend. The implementation converts aten.unsqueeze operations to aten.view operations, which are already supported by the NXP backend.

Key Changes:

  • Implemented a new pass ConvertUnsqueezeToViewPass that replaces aten.unsqueeze.default with aten.view.default operations
  • Integrated the new pass into the NeutronAtenPassManager pipeline
  • Added comprehensive test coverage for the conversion with various input shapes and dimension parameters

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.

File Description
backends/nxp/aten_passes/convert_unsqueeze_to_view.py New file implementing the pass to convert unsqueeze operations to view operations
backends/nxp/aten_passes/neutron_aten_pass_manager.py Added import and integration of ConvertUnsqueezeToViewPass into the pass manager
backends/nxp/tests/models.py Added UnsqueezeAddModel test model for testing unsqueeze operations
backends/nxp/tests/test_convert_unsqueeze_to_view_copy.py New test file with comprehensive tests for the unsqueeze-to-view conversion

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MartinPavella MartinPavella self-requested a review January 7, 2026 08:59
@novak-vaclav
Copy link
Contributor Author

novak-vaclav commented Jan 7, 2026

Fixed issues previously mentioned in this PR: #16466

  • added additional check for the presence of edge.aten.view_copy.default operator in the exported program.

Additionally renamed the test_convert_unsqueeze_to_view_copy.py to test_convert_unsqueeze_to_view.py since the conversion adds aten.view.default operators, not aten.view_copy.default.

Copilot AI review requested due to automatic review settings January 7, 2026 11:20
@novak-vaclav novak-vaclav force-pushed the feature/EIEX-243-conversion-and-quantization-of-aten-unsqueeze branch from 9b3848d to 81be94a Compare January 7, 2026 11:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MartinPavella MartinPavella merged commit 0391fe7 into pytorch:main Jan 7, 2026
144 of 146 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ release notes: nxp Changes to the NXP Neutron backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants