Skip to content

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

Open
novak-vaclav wants to merge 1 commit into
pytorch:mainfrom
nxp-upstream:feature/EIEX-894-add-support-for-conv2d-transposed-using-MLIR-flow
Open

NXP backend: added support for aten.conv_transpose2d using new MLIR flow#20807
novak-vaclav wants to merge 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.

❌ 4 New Failures, 1 Cancelled Job, 1 Unrelated Failure

As of commit 83446f8 with merge base 3bd4748 (image):

NEW FAILURES - The following jobs have failed:

  • Lint / lintrunner-mypy (gh)
    >>> Lint for backends/cortex_m/quantizer/pattern_matcher.py:
  • pull / android / build-android (gh)
    ImportError: /opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/executorch/extension/training/pybindings/_training_lib.cpython-311-x86_64-linux-gnu.so: undefined symbol: _ZN3c104impl3cow23materialize_cow_storageERNS_11StorageImplE
  • pull / unittest / linux / linux-job (gh)
    RuntimeError: Command docker exec -t 9e7887228fee0e90ba64818e5408f13a2f57a32b93097b29aaaa3173865b298b /exec failed with exit code 1
  • pull / unittest-editable / linux / linux-job (gh)
    RuntimeError: Command docker exec -t 4fd02ea2b090005d03f2fd97cdc45400777a62530e73419a2c79594d595c638e /exec failed with exit code 1

CANCELLED JOB - The following job was cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present 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 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 on lines 288 to +292
x, w, b, stride, padding, dilation, transposed, out_padding, groups = (
conv_node.args
)
return (
x,
w,
b,
list(stride),
list(padding),
list(dilation),
transposed,
list(out_padding),
groups,

return ConvParameters(
Comment on lines 225 to 235
@@ -212,7 +231,7 @@ def _is_supported_on_target(

else:
return ConvolutionConverter._is_supported_on_target_regular_conv(
node, parameters_mapping
node, neutron_target_spec, parameters_mapping
)
Comment on lines +109 to +113
kernel_size: Union[int, tuple[int, int]] = 3,
out_channels: int = 8,
padding: Union[str, int, Collection[int]] = 0,
output_padding: Union[int, tuple[int, int]] = 0,
stride: Union[int, tuple[int, int]] = 2,
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