NXP backend: added support for aten.conv_transpose2d using new MLIR flow#20807
Open
novak-vaclav wants to merge 1 commit into
Open
Conversation
🔗 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 FailureAs of commit 83446f8 with merge base 3bd4748 ( NEW FAILURES - The following jobs have failed:
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. |
|
Contributor
There was a problem hiding this comment.
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
Conv2dTransposedModuletest 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
ConvParametersto carry FX nodes for input/weight/bias and clarified handling ofoutput_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.
d0fd211 to
83446f8
Compare
Collaborator
Author
|
Fixed issues found by Copilot |
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added support for
aten.conv_transpose2dusing 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