NXP backend: Add prelu support using new neutron flow#20427
NXP backend: Add prelu support using new neutron flow#20427roman-janik-nxp wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20427
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 4 New Failures, 4 Unrelated FailuresAs of commit e8e3457 with merge base f5acbdb ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
19ab4f1 to
3bd49b7
Compare
There was a problem hiding this comment.
Pull request overview
Adds/expands PReLU delegation coverage for the NXP Neutron backend “new MLIR flow” by updating target-support checks (notably broadcast handling) and adding/refreshing unit tests and helper aliases/models.
Changes:
- Introduces a new broadcast eligibility helper (
inputs_satisfy_broadcast_condition) and switches Add/Mul/Sub/PReLU converters to use it. - Updates Neutron PReLU converter support rules and adds new test coverage (more ranks, conv+prelu, and
num_parametersvariant), including new op aliases/models. - Extends Add/Mul/Sub converter broadcast test parametrizations with an additional case.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| backends/nxp/tests/ops_aliases.py | Adds new op aliases used by updated tests (e.g., Prelu, GtScalar, WhereSelf). |
| backends/nxp/tests/models.py | Adds ConvPReLUModule test model to cover conv+prelu delegation. |
| backends/nxp/tests/ir/converter/node_converter/test_sub_tensor_converter.py | Adds an extra broadcast test case. |
| backends/nxp/tests/ir/converter/node_converter/test_prelu_converter.py | Reworks PReLU tests to the newer lower_run_compare harness and expands shape coverage. |
| backends/nxp/tests/ir/converter/node_converter/test_mul_tensor_converter.py | Adds an extra broadcast test case. |
| backends/nxp/tests/ir/converter/node_converter/test_add_tensor_converter.py | Adds an extra broadcast test case. |
| backends/nxp/backend/ir/converter/node_converters/ops_converters/sub_tensor_converter.py | Uses the new broadcast eligibility helper. |
| backends/nxp/backend/ir/converter/node_converters/ops_converters/prelu_converter.py | Updates target-support checks for PReLU in the new flow. |
| backends/nxp/backend/ir/converter/node_converters/ops_converters/mul_tensor_converter.py | Uses the new broadcast eligibility helper. |
| backends/nxp/backend/ir/converter/node_converters/ops_converters/add_tensor_converter.py | Uses the new broadcast eligibility helper. |
| backends/nxp/backend/ir/converter/node_converter.py | Adds inputs_satisfy_broadcast_condition (element-count based). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3bd49b7 to
e8e3457
Compare
Summary
Add tests verifying correct support for prelu by the Neutron backend using the new Neutron MLIR flow
Test plan
Unit tests provided.
cc @robert-kalmar @JakeStevens @digantdesai @rascani