NXP backend: Add prelu support using new neutron flow#20427
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: ❌ 1 New Failure, 2 PendingAs of commit 79b54d7 with merge base abd2b54 ( NEW FAILURE - The following job has failed:
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
novak-vaclav
left a comment
There was a problem hiding this comment.
A few minor comments, otherwise LGTM. Good job 😄
e8e3457 to
bf7bbd2
Compare
bf7bbd2 to
bb3368c
Compare
c2578b5 to
cf52386
Compare
|
@MartinPavella I added conditional Transpose ops for the channels first format and |
66904e6 to
33afb6a
Compare
33afb6a to
a79e40f
Compare
5141289 to
d245feb
Compare
d245feb to
32f50fe
Compare
32f50fe to
79b54d7
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