executorch icon indicating copy to clipboard operation
executorch copied to clipboard

NXP Backend: Add eIQ Neutron Backend

Open robert-kalmar opened this issue 9 months ago • 10 comments

Summary

Initial implementation for the NXP eIQ Neutron Backend for Neutron-N3-64 (i.MX RT700)

Test plan

Functionality tested by python unit tests:

pytest -c /dev/null/ backend/nxp/tests

cc @digantdesai @JakeStevens , @JakeStevens , @skywall

robert-kalmar avatar Apr 15 '25 13:04 robert-kalmar

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10196

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

:x: 10 New Failures

As of commit 8935fa549c593f7f06d12819b8a83d4da45d4fac with merge base 4559a618c66853d1a8b20e0b1b776013c4a54146 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

pytorch-bot[bot] avatar Apr 15 '25 13:04 pytorch-bot[bot]

@pytorchbot label "module: nxp" , label "release notes: nxp"

robert-kalmar avatar Apr 15 '25 13:04 robert-kalmar

Didn't find following labels among repository labels: ,,label

pytorch-bot[bot] avatar Apr 15 '25 13:04 pytorch-bot[bot]

wow this is a huge PR! I will try to go through this bit by bit and leave comments, expect a few days before we can finish reviewing this. Thanks though :)

digantdesai avatar Apr 15 '25 15:04 digantdesai

wow this is a huge PR! I will try to go through this bit by bit and leave comments, expect a few days before we can finish reviewing this. Thanks though :)

Unfortunately, it was hard to break it down as most of it is the infrastructure for conversion from Edge Dialect to format suitable for Neutron Converter (LiteRT/tflite flatbuffer). But let me give you some insight into the code, what hopefully help you with review:

  • the backends/nxp/backend/neutron_partitioner.py and backends/nxp/backend/nxp_backend.py are the main files for the eIQ Neutron Backend
  • the backends/nxp/backend/neutron_node_extraction.py contains logic to extract the microcode for the Neutron NPU from the Neutron Converter invocation.
  • the backends/nxp/backend/ir/lib/tflite is automatically generated from LiteRT flatbuffers schema
  • the backends/nxp/backend/ir/converter/builder is the LiteRT flatbuffer generation logic
  • the backend/nxp/backedns/ir/converter/node_conversion/ contains the conversion logic from Edge Dialect to LiteRT

robert-kalmar avatar Apr 17 '25 14:04 robert-kalmar

@robert-kalmar please make sure to run the linter and re-submit

JakeStevens avatar Apr 22 '25 13:04 JakeStevens

@robert-kalmar please make sure to run the linter and re-submit

Still failing after latest push.

JakeStevens avatar Apr 22 '25 20:04 JakeStevens

Linting errors should be fixed now.

robert-kalmar avatar Apr 25 '25 11:04 robert-kalmar

Think you need just one more run of the linter, misplaced import

JakeStevens avatar Apr 25 '25 17:04 JakeStevens

Think you need just one more run of the linter, misplaced import

Hopefully fixed in last push.

robert-kalmar avatar Apr 28 '25 14:04 robert-kalmar

Failed tests seem unrelated but will let @digantdesai take a look

JakeStevens avatar May 12 '25 14:05 JakeStevens

Yeah looks unrelated. Let's merge, worst case if this causes some instability we can revert it.

digantdesai avatar May 12 '25 15:05 digantdesai

@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 12 '25 15:05 facebook-github-bot