Repository navigation
Qualcomm AI Engine Direct - Fold views of parameters before annotation - #24384
Open
msluszniak wants to merge 2 commits into
Open
msluszniak wants to merge 2 commits into
msluszniak wants to merge 2 commits into
Conversation
With query != value, nn.MultiheadAttention splits in_proj_weight at runtime, so each projection's weight is a split output, not a parameter. Quantized with per-channel linear weights, that per-channel encoding never becomes a static weight and AnnotateQuantAttrs fails with KeyError 'scale'. FoldConstantViews replaces views and splits of a parameter with constants first.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24384
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit fa14b48 with merge base 2d8cd35 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With query != value,
nn.MultiheadAttentionsplitsin_proj_weightat runtime. Quantized with per-channel linear weights (8a8w or 16a8w), lowering then fails inAnnotateQuantAttrswithKeyError: 'scale', since the weight is a split output, not a parameter.FoldConstantViewsreplaces views and splits of a parameter with constants before annotation.Found quantizing RF-DETR. Test:
test_fold_constant_views_mha_in_proj(fails without the pass).cc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @qti-horodnic @cbilgin @abhinaykukkadapu @psiddh @nil-is-all