Skip to content

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

Open
roman-janik-nxp wants to merge 4 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#20301
roman-janik-nxp wants to merge 4 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 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Only last 2 commits apply. Requires NXP backend: Improve test result gathering#20024 PR to be merged. 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

@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 16, 2026
@pytorch-bot

pytorch-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20301

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures, 1 Pending

As of commit 278b617 with merge base 06143cb (image):

NEW FAILURES - The following jobs have failed:

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

Copy link
Copy Markdown

CLA Not Signed

),
],
)
def test__w_conv_unsupported(self, input_spec):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems odd to me to handle the broadcasting stuff in a prelu PR (since the input alpha should always have the shape [1] or [<num_channels>], neither of which should be relevant), but so be it.

I assume you are working on EIEX-908. But unless I'm missing something, you didn't address the related EIEX-932 (which is apparently also in progress in JIRA). The second task specifically focuses on removing the restrictions related channels last broadcasting, which sometimes requires the insertion of Transpose ops. Now that all transpositions are supported, these tests should be enabled as well.

Are you planning on including EIEX-932 here as well? If not, why is EIEX-908 included in this prelu PR?

pytest.param((1,), id="1D."),
pytest.param(
(36, 487),
id="2D incorrect.",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The id incorrect doesn't provide much context to someone hypothetically seeing this test fail in the console. Consider id="2D incorrect results.".

# Check `prelu` was not decomposed into simpler edge operators
assert not graph_contains_any_of_ops(
exported_program.graph,
class TestPreluConverter:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any tests using the num_parameters torch.nn.PReLU parameter. Is it intentional?

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