NXP backend: Add post-quantization data utilization to aot_neutron_compile.py.#17479
Conversation
🔗 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. ❌ 4 New FailuresAs of commit f99baab with merge base 2cad5db ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
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()intoNeutronPartitionerinaot_neutron_compile.pywhen delegation is enabled. - Add a new pytest that runs the AOT example script for MobileNetV2 and inspects the produced
.ptefor 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.
23adc42 to
ad6d973
Compare
|
looks like it is failing to load from URL. Maybe just use random weights + data instead of "real"? |
aac78f3 to
24c6762
Compare
24c6762 to
3c23f5a
Compare
…ompile.py`. This data is used to correctly assess Neutron operator support during partitioning.
3c23f5a to
f99baab
Compare
|
The failing checks seem unrelated and the internal build passed. Merging. |
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