Skip to content

NXP backend: Add post-quantization data utilization to aot_neutron_compile.py.#17479

Open
MartinPavella wants to merge 1 commit intopytorch:mainfrom
nxp-upstream:nxg01483/EIEX-731-use-post-quantization-state-dict-in-aot_neutron_compile-partitioning
Open

NXP backend: Add post-quantization data utilization to aot_neutron_compile.py.#17479
MartinPavella wants to merge 1 commit intopytorch:mainfrom
nxp-upstream:nxg01483/EIEX-731-use-post-quantization-state-dict-in-aot_neutron_compile-partitioning

Conversation

@MartinPavella
Copy link
Collaborator

@MartinPavella MartinPavella commented Feb 16, 2026

Summary

A recent PR added the option to use the post-quantization state dict to access static data during quantization. This PR adds this feature to the aot_neutron_compile.py.

Test plan

Unit-test with the example MobileNetV2 is provided.

cc @robert-kalmar @JakeStevens @digantdesai

@MartinPavella MartinPavella self-assigned this Feb 16, 2026
@MartinPavella MartinPavella added the module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ label Feb 16, 2026
@MartinPavella MartinPavella added the release notes: nxp Changes to the NXP Neutron backend delegate label Feb 16, 2026
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 16, 2026

🔗 Helpful Links

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

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

❌ 9 New Failures

As of commit ad6d973 with merge base 7f91ed4 (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 Feb 16, 2026
@StrycekSimon StrycekSimon requested a review from Copilot February 16, 2026 14:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support in the NXP AOT compile example for using post-quantization model data (state dict) during partitioning/lowering, and introduces a regression test intended to validate end-to-end delegation for MobileNetV2.

Changes:

  • Pass post_quantization_state_dict=module.state_dict() into NeutronPartitioner in aot_neutron_compile.py when delegation is enabled.
  • Add a new pytest that runs the AOT example script for MobileNetV2 and inspects the produced .pte for delegation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
examples/nxp/aot_neutron_compile.py Provides post-quantization state dict to the partitioner so static tensors can be recovered during partitioning with fake tensors.
backends/nxp/tests/test_aot_example.py Adds an end-to-end test that runs the example script and validates the serialized program contains Neutron delegation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MartinPavella MartinPavella force-pushed the nxg01483/EIEX-731-use-post-quantization-state-dict-in-aot_neutron_compile-partitioning branch from c371a70 to 23adc42 Compare February 16, 2026 15:13
…ompile.py`.

This data is used to correctly assess Neutron operator support during partitioning.
@MartinPavella MartinPavella force-pushed the nxg01483/EIEX-731-use-post-quantization-state-dict-in-aot_neutron_compile-partitioning branch from 23adc42 to ad6d973 Compare February 17, 2026 08:01
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.

1 participant