[QNN EP] Handle broadcast Gemm C with FC and Add - #741
Merged
qti-yuduo merged 1 commit intoAug 21, 2026
Merged
Conversation
qti-yuduo
force-pushed
the
fix/gemm-column-broadcast-c
branch
from
August 17, 2026 21:37
36f8abc to
4262793
Compare
qti-yuduo
force-pushed
the
fix/gemm-column-broadcast-c
branch
from
August 17, 2026 22:17
4262793 to
8e6068f
Compare
qti-yuduo
marked this pull request as ready for review
August 17, 2026 22:19
qti-yuduo
requested review from
qti-ashwshan,
qti-chuteng,
qti-jkilpatrick,
qti-kromero,
tirupath-qti and
yath1
as code owners
August 17, 2026 22:19
quic-muchhsu
approved these changes
Aug 17, 2026
qti-ashwshan
approved these changes
Aug 21, 2026
qti-ashwshan
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! we are correctly gating ExplictOpCheck to let decomposable bias shapes flow through to the existing FC+Add path instead of rejecting them outright.
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.
Summary
Root cause
ORT MatMulAddFusion can produce Gemm with C=[M,1] from MatMul followed by a column-broadcast Add. ONNX permits C to broadcast to [M,N], but QNN FullyConnected can consume only one bias value per output channel. Validation rejected C before the existing FC + Add lowering could run.
The fix keeps scalar C for N=1, [N], and [1,N] on the direct FC path. Other valid broadcasts use a separate Add; block-quantized Gemm remains strict.