Skip to content

NXP backend: Add prelu support using new neutron flow#20427

Open
roman-janik-nxp wants to merge 2 commits into
pytorch:mainfrom
nxp-upstream:feature/nxg11066/EIEX-873-Add-prelu-support-using-new-Neutron-flow
Open

NXP backend: Add prelu support using new neutron flow#20427
roman-janik-nxp wants to merge 2 commits into
pytorch:mainfrom
nxp-upstream:feature/nxg11066/EIEX-873-Add-prelu-support-using-new-Neutron-flow

Conversation

@roman-janik-nxp

@roman-janik-nxp roman-janik-nxp commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

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

@roman-janik-nxp roman-janik-nxp 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 Jun 22, 2026
@pytorch-bot

pytorch-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

🔗 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 SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 4 New Failures, 4 Unrelated Failures

As of commit e8e3457 with merge base f5acbdb (image):

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.

@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 Jun 22, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 22, 2026

Copy link
Copy Markdown

CLA Not Signed

@roman-janik-nxp

Copy link
Copy Markdown
Collaborator Author

@novak-vaclav

@roman-janik-nxp roman-janik-nxp force-pushed the feature/nxg11066/EIEX-873-Add-prelu-support-using-new-Neutron-flow branch from 19ab4f1 to 3bd49b7 Compare June 22, 2026 17:24
@novak-vaclav novak-vaclav requested a review from Copilot June 23, 2026 14:00

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

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_parameters variant), 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.

@novak-vaclav novak-vaclav self-requested a review June 23, 2026 14:49
@roman-janik-nxp roman-janik-nxp force-pushed the feature/nxg11066/EIEX-873-Add-prelu-support-using-new-Neutron-flow branch from 3bd49b7 to e8e3457 Compare June 23, 2026 15:04
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