Skip to content

NXP backend: Enable Neg with new Neutron flow#20451

Merged
roman-janik-nxp merged 1 commit into
pytorch:mainfrom
nxp-upstream:feature/nxg11066/EIEX-871-Add-neg-support-using-new-Neutron-flow
Jun 29, 2026
Merged

NXP backend: Enable Neg with new Neutron flow#20451
roman-janik-nxp merged 1 commit into
pytorch:mainfrom
nxp-upstream:feature/nxg11066/EIEX-871-Add-neg-support-using-new-Neutron-flow

Conversation

@roman-janik-nxp

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

Copy link
Copy Markdown
Collaborator

Summary

Add tests verifying correct support for neg 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 23, 2026
@pytorch-bot

pytorch-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 15 Pending

As of commit 7c69439 with merge base d19320d (image):
💚 Looks good so far! There are no failures yet. 💚

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

linux-foundation-easycla Bot commented Jun 23, 2026

Copy link
Copy Markdown

CLA Not Signed

@roman-janik-nxp roman-janik-nxp force-pushed the feature/nxg11066/EIEX-871-Add-neg-support-using-new-Neutron-flow branch from 8bb5038 to 6a6508a Compare June 24, 2026 09:54

@novak-vaclav novak-vaclav left a comment

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.

LGTM, good job! 👍

Comment thread backends/nxp/tests/ir/converter/node_converter/test_neg_converter.py Outdated
tflite_input_preprocess=ToChannelLastPreprocess(),
tflite_output_preprocess=ToChannelFirstPreprocess(),
)
class TestNeg:

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.

You removed tests with multiple different input shapes, and left only 2, both with multiples of num_macs. Why don't you test with more shapes?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I was inspired by Exp operator. As the op is internally Sub, I considered it tested with various shapes there. Do you think I should add them back?

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.

Personally I would definitely test with a similar coverage of shapes as we do for other similar operators. We never know what sort of edge case it might uncover. Or if we ever decide to support the operator some other way (e.g. we decide Mul(x, -1) is more efficient or whatever), relying on the tests of some other operator may be invalid.

@roman-janik-nxp roman-janik-nxp force-pushed the feature/nxg11066/EIEX-871-Add-neg-support-using-new-Neutron-flow branch from 6a6508a to e186606 Compare June 26, 2026 17:41
@MartinPavella MartinPavella self-requested a review June 29, 2026 07:16

@MartinPavella MartinPavella left a comment

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.

Please add more shapes to the tests. Otherwise, LGTM 👍🏻

@roman-janik-nxp roman-janik-nxp force-pushed the feature/nxg11066/EIEX-871-Add-neg-support-using-new-Neutron-flow branch from e186606 to 7c69439 Compare June 29, 2026 15:17
@roman-janik-nxp roman-janik-nxp merged commit 2af5638 into pytorch:main Jun 29, 2026
179 of 180 checks passed
@roman-janik-nxp roman-janik-nxp deleted the feature/nxg11066/EIEX-871-Add-neg-support-using-new-Neutron-flow branch June 29, 2026 16:56
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.

3 participants