Skip to content

NXP backend: Add Neutron backend to /backend/test/suite/operators testing. - #21712

Open
MartinPavella wants to merge 6 commits into
pytorch:mainfrom
nxp-upstream:nxg01483/EIEX-1036-add-neutron-backend-to-the-automatic-test-suite-harness-testing
Open

NXP backend: Add Neutron backend to /backend/test/suite/operators testing.#21712
MartinPavella wants to merge 6 commits into
pytorch:mainfrom
nxp-upstream:nxg01483/EIEX-1036-add-neutron-backend-to-the-automatic-test-suite-harness-testing

Conversation

@MartinPavella

@MartinPavella MartinPavella commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Use the testing suite in /backend/test/suite/operators to test the Neutron backend. Currently, all tests are passing except for 2 cat tests and all lstm tests due to known bugs in the NeutronConverter (so these tests are skipped).

Test plan

pytest -c /dev/nul backends/test/suite/operators/ -m backend_nxp -n auto

cc @robert-kalmar @JakeStevens @digantdesai @rascani

@MartinPavella MartinPavella self-assigned this Aug 10, 2026
@MartinPavella MartinPavella 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 Aug 10, 2026
@pytorch-bot

pytorch-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 8 Pending

As of commit bfb2aa6 with merge base 92079a2 (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 Aug 10, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 10, 2026

Copy link
Copy Markdown

CLA Not Signed

pass

@staticmethod
@classmethod

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.

This change was introduced because the HardTanhConverter inherits from ClampConverter and uses its methods while overriding others. So only ClampConverter implements is_supported_on_target, which internally calls get_bounds which is implemented in botch classes differently. Therefore, is_supported_on_target must be a class method.

(It worked before this commit because the ClampConverter actually defined the is_supported_on_target as a class method, even thought its parent class NodeConverter declared is as a static method.)

@MartinPavella
MartinPavella force-pushed the nxg01483/EIEX-1036-add-neutron-backend-to-the-automatic-test-suite-harness-testing branch 2 times, most recently from f29cc01 to 2538c0f Compare August 10, 2026 12:59
@rascani

rascani commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Can you look into the test failures?

@MartinPavella
MartinPavella force-pushed the nxg01483/EIEX-1036-add-neutron-backend-to-the-automatic-test-suite-harness-testing branch 7 times, most recently from 2d00aab to 5ae2fbb Compare August 14, 2026 11:34
@MartinPavella

Copy link
Copy Markdown
Collaborator Author

Can you look into the test failures?

All fixed and ready for review.

@MartinPavella
MartinPavella marked this pull request as ready for review August 14, 2026 11:35

@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.

I really like the integration into the community test harness, good job 🫵👍👍👍

I have a few comments, but nothing serious.

Comment thread backends/test/suite/flows/nxp.py Outdated
Comment thread backends/test/suite/flows/nxp.py
Comment thread backends/nxp/tests/tester/tester.py
Comment thread backends/nxp/tests/tester/tester.py Outdated
Comment thread backends/nxp/tests/tester/tester.py Outdated
Comment thread backends/nxp/tests/tester/tester.py
Comment thread backends/nxp/tests/tester/tester.py Outdated
Comment thread .github/workflows/pull.yml Outdated
Comment thread .github/workflows/pull.yml Outdated
Comment thread backends/nxp/tests/tester/tester.py Outdated
Comment thread .github/workflows/pull.yml Outdated
PYTHON_EXECUTABLE=python NXP_RUNNER_PATH="./examples/nxp/executor_runner/build/nxp_executor_runner" \
bash backends/nxp/run_unittests.sh

test-nxp-testsuite-linux:

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.

Take a look at test-backend-*.yml files. These all leverage the reusable _test_backend.yml, and we should probably create a test-backend-nxp.yml job. I recently also setup the backend test harness for cortex-m, you can probably use it as a template. #21854

@MartinPavella MartinPavella Aug 19, 2026

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.

Thank you for pointing that out to me.
I have remove the test-nxp-testsuite-linux from pull.yml and instead I created a test-backend-nxp.yml which uses _test_backend.yml based on how you used it for Cortex-M in your PR.

Edit: The job passed and produced the expected test report.

@MartinPavella
MartinPavella force-pushed the nxg01483/EIEX-1036-add-neutron-backend-to-the-automatic-test-suite-harness-testing branch from 8d3c25f to a420979 Compare August 20, 2026 09:30
@MartinPavella
MartinPavella force-pushed the nxg01483/EIEX-1036-add-neutron-backend-to-the-automatic-test-suite-harness-testing branch from a420979 to bfb2aa6 Compare August 20, 2026 09:48
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