Add matmul+add+relu QDQ node group - #694
Merged
Merged
Conversation
qti-shubham
requested review from
qti-ashwshan,
qti-chuteng,
qti-jkilpatrick,
qti-kromero,
qti-yuduo,
tirupath-qti and
yath1
as code owners
August 4, 2026 02:06
Collaborator
Author
|
/code-reviewer |
qti-yuduo
reviewed
Aug 6, 2026
qti-yuduo
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the absorbed-Reshape path and validated each concern empirically on Windows ARM64 / HTP V73 (QAIRT 2.46) by instrumenting GetOrtQDQSelection and running the new tests. The design is sound and mirrors the existing redundant_clip_node_ pattern; no correctness bug survived verification. Four inline notes follow, ordered by how much I'd want them addressed. The main one is test efficacy: none of the three new tests can currently fail if the feature were reverted.
qti-yuduo
reviewed
Aug 10, 2026
qti-yuduo
approved these changes
Aug 10, 2026
qti-shubham
force-pushed
the
dev/shubpate/matmul_add_relu_supergroup
branch
from
August 13, 2026 00:02
b4575ea to
453b560
Compare
qti-shubham
enabled auto-merge (squash)
August 13, 2026 00:02
This reverts commit 88ec2b5. The MatMul+Add+Relu supergroup selector targeted the raw MatMul -> Add -> Relu -> Q shape, but under ORT_ENABLE_ALL (real inference sessions), ORT's L1 optimizer MatMulAddFusion rewrites this pattern into a single Gemm node with the Add already fused as input C. The supergroup path never fired in production. The companion tests hid the gap by forcing ORT_DISABLE_ALL. Reverting so the Gemm supergroup follow-up can land as the single, production-visible path. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…unit Absorbs the MatMulAddFusion-inserted output Reshape (and Relu when encoding-safe) so the QDQ group's terminal Q attaches to FC's output encoding.
qti-shubham
force-pushed
the
dev/shubpate/matmul_add_relu_supergroup
branch
from
August 14, 2026 03:01
453b560 to
5d0a578
Compare
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.
Description
Pattern: DQ(input) + DQ(weight) -> MatMul -> Add(DQ(int32 bias)) -> Relu -> Q
Before: quantized_reshape → quantized_FC → float_reshape → float_Relu → quantized_Q
After: quantized_reshape → quantized_FC(with bias) → quantized_reshape -> Quant_Relu (if encoding min !=0)