Skip to content

Require canceling transpose paths for shared outputs - #32861

Closed
hendrickhan wants to merge 1 commit into
microsoft:mainfrom
hendrickhan:xiao.add_branch_case_check_for_cost
Closed

hendrickhan wants to merge 1 commit into
microsoft:mainfrom
hendrickhan:xiao.add_branch_case_check_for_cost

Conversation

@hendrickhan

Copy link
Copy Markdown

Description

Motivation and Context

Copilot AI balanced review requested due to automatic review settings September 28, 2026 06:57
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Consumer completeness and execution-provider boundaries can produce false cancellation-path results.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates transpose-cost heuristics to require viable cancellation paths for shared outputs.

Changes:

  • Adds downstream canceling-transpose path detection.
  • Adds QDQ branching regression coverage.
File Description
onnxruntime/​core/​optimizer/​transpose_optimization/​onnx_transpose_optimization.cc Refines shared-output transpose cost calculation.
onnxruntime/​test/​optimizer/​transpose_optimizer_test.cc Tests branched QDQ transpose behavior.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +2989 to +2990
for (auto& consumer : consumers->nodes) {
if (consumer->IsOp("Transpose")) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants