-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[QNN EP] Lower Gemm with 2d bias to FC + ElementwiseAdd when targeting HTP. #25605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QNN EP] Lower Gemm with 2d bias to FC + ElementwiseAdd when targeting HTP. #25605
Conversation
Signed-off-by: Mu-Chein Hsu <quic_muchhsu@quicinc.com>
|
@microsoft-github-policy-service agree company=Qualcomm |
Signed-off-by: Mu-Chein Hsu <quic_muchhsu@quicinc.com>
|
/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows x64 QNN CI Pipeline |
|
Azure Pipelines successfully started running 5 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies the QNN execution provider to support Gemm operations with 2D bias matrices when targeting HTP (Hardware Transform Pipeline). Previously, these operations would fall back to CPU execution.
- Updates Gemm operator support to handle 2D bias matrices by decomposing them into FullyConnected + ElementwiseAdd operations
- Modifies validation logic to allow 2D bias with shape [N, M] for non-quantized inputs
- Updates test cases to verify that Gemm with 2D bias is now assigned to QNN EP instead of falling back to CPU
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| gemm_op_test.cc | Updates test cases to verify 2D bias support and changes expected EP assignment from None to All |
| gemm_op_builder.cc | Implements logic to decompose Gemm with 2D bias into FullyConnected + ElementwiseAdd operations |
…g HTP. (microsoft#25605) ### Description Lower Gemm with 2d bias to FC + ElementwiseAdd when targeting HTP. ### Motivation and Context This change will allow Gemm with 2d bias stays on HTP and not falling back to CPU. --------- Signed-off-by: Mu-Chein Hsu <quic_muchhsu@quicinc.com>
Description
Lower Gemm with 2d bias to FC + ElementwiseAdd when targeting HTP.
Motivation and Context
This change will allow Gemm with 2d bias stays on HTP and not falling back to CPU.