Repository navigation
[rewriter] Skip FusedMatMul batch-transpose fusion on mismatched ranks - #3159
Open
Syed Mudassir (Syedmudassir1604) wants to merge 3 commits into
Open
Syed Mudassir (Syedmudassir1604) wants to merge 3 commits into
Syed Mudassir (Syedmudassir1604) wants to merge 3 commits into
Conversation
…microsoft#3156) ONNX Runtime only honors transBatchA/transBatchB when both inputs have the same rank of at least 3. Folding a batch Transpose into FusedMatMul from the permutation alone produced a rank-3 x rank-2 FusedMatMul that failed at runtime. Co-authored-by: Arjun <arjunanand13@users.noreply.github.com>
…l-transbatch-rank-8456
Exercise both operands, unknown and mismatched ranks, existing batch flags, and valid batch-transpose cancellation. Verify initializer projections through optimize_for_ort and execute equal-rank fusions with ORT optimizations disabled. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3159 +/- ##
==========================================
+ Coverage 73.77% 73.83% +0.05%
==========================================
Files 270 270
Lines 33876 33979 +103
Branches 3243 3251 +8
==========================================
+ Hits 24993 25089 +96
- Misses 7829 7839 +10
+ Partials 1054 1051 -3 ☔ View full report in Codecov by Harness. |
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.
Fixes #3156
Skip batch-transpose folding when the resulting
transBatchA/transBatchBflags require ranks that are unknown, unequal, or below 3. Preserve valid equal-rank fusions, batch-flag cancellation, and scalarDivfolding intoalpha.Regression coverage exercises both operands, existing batch flags, unknown/mismatched ranks, and initializer projections through
optimize_for_ort. ORT CPU runs with graph optimizations disabled verify the rewritten graphs.Validation: 32 tests and 200 rank/flag subtests pass;
lintrunner -ais clean. Synced with currentmain.