Skip to content

Conversation

@justinchuby
Copy link
Member

@justinchuby justinchuby commented Oct 1, 2025

This PR implements shape merging functionality in the identity elimination pass to preserve shape information when eliminating redundant Identity nodes.

Following microsoft/onnxscript#2588.

Following microsoft/onnxscript#2588. Handle shape info as well.

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a 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 implements shape merging functionality in the identity elimination pass to preserve shape information when eliminating redundant Identity nodes. The change builds on previous work to handle shape metadata during optimization.

  • Adds a _merge_shapes helper function to intelligently combine shape information from input and output values
  • Updates the identity elimination logic to preserve the most complete shape and type information available

@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.83%. Comparing base (49a361c) to head (6c0edcc).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/onnx_ir/passes/common/identity_elimination.py 80.95% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #206      +/-   ##
==========================================
+ Coverage   76.80%   76.83%   +0.03%     
==========================================
  Files          40       40              
  Lines        4915     4943      +28     
  Branches      978      988      +10     
==========================================
+ Hits         3775     3798      +23     
- Misses        856      858       +2     
- Partials      284      287       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

justinchuby and others added 2 commits October 1, 2025 09:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby justinchuby added this to the 0.1.11 milestone Oct 1, 2025
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby justinchuby requested a review from Copilot October 6, 2025 17:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

@justinchuby justinchuby enabled auto-merge (squash) October 6, 2025 17:33
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
30.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@justinchuby justinchuby merged commit 59086bc into main Oct 6, 2025
23 of 24 checks passed
@justinchuby justinchuby deleted the justinchuby-patch-1 branch October 6, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants