Arm backend: Fix incorrect qparams propagation #15698
Open
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.
For some passes after q-dq-folding, metadata was naively copied to all new nodes in decomposition. This can lead to problems if these nodes were to be computed ahead of time. This is solved by introducing a new optional argument to create_node, called inherit_qparams that defaults to false. This means that you explicitly need to set it to True in order to inherit qparams from the original node. For call_operator passes, the metadata dict is copied and modified in each pass. The patch also removes a few duplicate passes in ArmPassManager.
cc @freddan80 @per @zingo @digantdesai