Prerequiste changes to export mv3/mv2 targetting CMSIS-NN backend #16393
+7
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR correctly identifies that ConvertToCortexMPass inherits from XNNPACKPass and properly passes it the exported_program() argument:
[PLEASE REMOVE] If this PR closes an issue, please add a
Fixes #<issue-id>line.[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: " label. For a list of available release notes labels, check out CONTRIBUTING.md's Pull Requests.
Test plan
python3 -m examples.arm.aot_arm_compiler -m mv2 --target=ethos-u55-128 --quantize --enable_qdq_fusion_pass --output=./output/mv2_cmsis
Without this change, the error would be
File "/home/sidart/executorch/examples/arm/aot_arm_compiler.py", line 808, in transform_for_cortex_m_backend
else pass_cls()
TypeError: XNNPACKPass.init() missing 1 required positional argument: 'exported_program'"