Skip to content

NXP backend: added support for aten.conv_transpose2d using new MLIR flow#20807

Merged
novak-vaclav merged 1 commit into
pytorch:mainfrom
nxp-upstream:feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow
Jul 16, 2026
Merged

NXP backend: added support for aten.conv_transpose2d using new MLIR flow#20807
novak-vaclav merged 1 commit into
pytorch:mainfrom
nxp-upstream:feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow

Conversation

@novak-vaclav

Copy link
Copy Markdown
Collaborator

Summary

Added support for aten.conv_transpose2d using new Neutron flow.

Test plan

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

cc @robert-kalmar @JakeStevens @digantdesai @rascani @MartinPavella

Copilot AI review requested due to automatic review settings July 9, 2026 17:03
@novak-vaclav novak-vaclav added module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ release notes: nxp Changes to the NXP Neutron backend delegate labels Jul 9, 2026
@pytorch-bot

pytorch-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 1 Pending

As of commit 857cb68 with merge base 43bdb7b (image):
💚 Looks good so far! There are no failures yet. 💚

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 Jul 9, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 9, 2026

Copy link
Copy Markdown

CLA Not Signed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 extends the NXP backend’s new Neutron MLIR flow to support aten.conv_transpose2d (via aten.convolution with transposed=True), and updates the NXP test suite to validate delegation + numerical correctness across a broader set of transpose-conv shapes/parameters.

Changes:

  • Added a reusable Conv2dTransposedModule test model and expanded transpose-conv test coverage (delegated and non-delegated cases).
  • Refactored convolution delegation checks in ConvolutionConverter (regular + transposed) to use shared parameter extraction and updated Neutron constraints.
  • Adjusted ConvParameters to carry FX nodes for input/weight/bias and clarified handling of output_padding.

Reviewed changes

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

File Description
backends/nxp/tests/models.py Adds a ConvTranspose2d-based module used by backend tests.
backends/nxp/tests/ir/converter/node_converter/test_conv_converter.py Reworks and significantly expands transpose-conv delegation/correctness tests.
backends/nxp/backend/ir/converter/node_converters/shared/conv_utils.py Extends ConvParameters to include input/weight/bias FX nodes and updates out_padding typing/comment.
backends/nxp/backend/ir/converter/node_converters/ops_converters/convolution_converter.py Updates delegation support checks and conversion flow to use the new ConvParameters structure and Neutron constraints.

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

Comment thread backends/nxp/backend/ir/converter/node_converters/shared/conv_utils.py Outdated
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch from d0fd211 to 83446f8 Compare July 9, 2026 17:20
Copilot AI review requested due to automatic review settings July 9, 2026 17:20
@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Fixed issues found by Copilot

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 comments.

Comment thread backends/nxp/tests/models.py
Copilot AI review requested due to automatic review settings July 13, 2026 10:13
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch from 83446f8 to b6f0fff Compare July 13, 2026 10:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch from b6f0fff to 95f5378 Compare July 13, 2026 15:39
Copilot AI review requested due to automatic review settings July 13, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@roman-janik-nxp roman-janik-nxp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Conv converter support checks are now more readable. Kudos for extensive tests. Please rabase and fix the found issues. Also 2 tests still fail on filename too long error.

Comment thread backends/nxp/tests/ir/converter/node_converter/test_conv_converter.py Outdated
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch from 95f5378 to 509b206 Compare July 14, 2026 17:55
Copilot AI review requested due to automatic review settings July 14, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch from 509b206 to d0197a9 Compare July 14, 2026 18:06
Copilot AI review requested due to automatic review settings July 15, 2026 06:44
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch from d0197a9 to 360a4e7 Compare July 15, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 15, 2026 06:50
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch from 360a4e7 to 6423ced Compare July 15, 2026 06:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@novak-vaclav

Copy link
Copy Markdown
Collaborator Author
  • Fixed issues found by @roman-janik-nxp
  • Removed constraints for padding and kernel_size in CONV2D, as discussed with @robert-kalmar and the Neutron team
  • Refactored test_conv_converter so the tests use use_qat fixture, resulting in cleaner code (the fixture was not originally used because I needed to selectively mark either PTQ/QTA tests as xfail)

@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

And shortened the names of the tests so pytest does not fail.

@roman-janik-nxp roman-janik-nxp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good job!

Copilot AI review requested due to automatic review settings July 16, 2026 13:51
@novak-vaclav
novak-vaclav force-pushed the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch from 6423ced to 857cb68 Compare July 16, 2026 13:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Thank you for the approval.
I rebased onto main. Once tests pass, I will merge.

@novak-vaclav

Copy link
Copy Markdown
Collaborator Author

Internal tests are passing, Github CI failures do not seem to be related to this code.
Merging.

@novak-vaclav
novak-vaclav merged commit ab4271f into pytorch:main Jul 16, 2026
296 of 298 checks passed
@novak-vaclav
novak-vaclav deleted the feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow branch July 16, 2026 17:06
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.

3 participants