[QNN-EP] Einsum equation ReduceSum Multiply on broadcast X#25581
Merged
HectorSVC merged 1 commit intomicrosoft:mainfrom Jul 30, 2025
Merged
[QNN-EP] Einsum equation ReduceSum Multiply on broadcast X#25581HectorSVC merged 1 commit intomicrosoft:mainfrom
HectorSVC merged 1 commit intomicrosoft:mainfrom
Conversation
Contributor
|
/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows x64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline |
|
Azure Pipelines successfully started running 5 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a new Einsum equation pattern "ReduceSum Multiply on broadcast X" (e.g., "bhwc,wkc->bhwk") to the QNN provider. The implementation handles cases where the first input needs broadcasting and both inputs are multiplied before being reduced along the contraction axis.
- Adds pattern recognition for the new ReduceSum Multiply broadcast equation type
- Implements the equation by reshaping, multiplying with broadcasting, and reducing along the contraction axis
- Includes comprehensive test coverage across CPU, HTP, and GPU backends with appropriate disabling for known issues
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| onnxruntime/test/providers/qnn/einsum_op_test.cc | Adds test cases for the new equation pattern across different backends, with some disabled due to QAIRT limitations |
| onnxruntime/core/providers/qnn/builder/opbuilder/einsum_op_builder.cc | Implements pattern detection and graph construction for ReduceSum Multiply broadcast operations |
Comments suppressed due to low confidence (1)
onnxruntime/test/providers/qnn/einsum_op_test.cc:192
- The test name 'EinsumRank4MatMulTransposeAll2' is misleading as this test was moved and replaced with a different equation pattern. The name should reflect that this is testing the ReduceSum Multiply broadcast functionality, not MatMul transpose.
TEST_F(QnnCPUBackendTests, EinsumRank4MatMulTransposeAll2) {
HectorSVC
approved these changes
Jul 30, 2025
sanketkaleoss
pushed a commit
to sanketkaleoss/onnxruntime
that referenced
this pull request
Aug 11, 2025
…#25581) [QNN-EP] Einsum equation ReduceSum Multiply on broadcast X
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.
[QNN-EP] Einsum equation ReduceSum Multiply on broadcast X