Cherry pick cgir fixes to main - #1435
Merged
Merged
Conversation
## Summary Remove two CGC compatibility workarounds following upstream IX fixes already included in the current compiler version (`35c01c26`). | Removed workaround | Upstream issue | Fix | |---|---|---| | `eliminate-identity` | microsoft/ix#1198 — ONNX Identity fails to lower to Foundry and DXCGC | microsoft/ix#1201 adds native Identity lowering. | | Pad-specific constant folding (`fold_constant_pad_pads`) and the `fold-constant-pad-pads` compatibility alias | microsoft/ix#1199 — Support constant folding of ONNX Pad parameters before lowering | microsoft/ix#1206 improves Cast/Pad chain support, static shape inference, and lowering type compatibility. | ## Changes - Remove the Identity rewrite implementation, capability registration, and public export. - Remove the Pad-specific folding prepass and its dedicated dead-producer cleanup. - Remove the `fold-constant-pad-pads` alias and public function export. - Update documentation and tests to reflect the retired rules. - Preserve `cgc-constant-folding` and its shared integer/boolean expression evaluator. General folding remains necessary for static shape chains and continues to fold Pad parameters in graphs containing `Shape`. - Leave compiler options, including the default-enabled topological sorting, unchanged. ## Validation - 203 affected unit tests passed. - All five models that previously used the Pad-specific prepass retained identical Pad parameter values. - GPU outputs before and after Pad-prepass removal were elementwise identical across three input samples per model. - The three SOD models required topological sorting to be disabled for the GPU comparison because the current wheel does not yet include the fix for microsoft/ix#1207. Their default-path conversion failure remains unchanged. - End-to-end SOD validation through JSON config, build, perf, and eval is still in progress. (cherry picked from commit 855fe5c)
Disable topological sorting by default for CGIR conversion to work around microsoft/ix#1207, whose fix is not included in the compiler shipped with the current Windows ML wheel. This avoids conversion failures in the three P1 models and aligns with IX OnnxConverter’s default. Sorting remains available through `topo-sort-nodes=true`. (cherry picked from commit ff977dd)
Qiong Wu (qiowu) (DingmaomaoBJTU)
approved these changes
Sep 22, 2026
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.
Summary
Cherry-pick #1432 and #1434 from
release/v0.4.0ontomain.topo-sort-nodes=true.Source commits
855fe5c4dfaf2f501d4aacdfb0460939a813c26eff977dd98c68d6f1f520a69ea33e99cb4279cb86Both commits were cherry-picked without conflicts, with source commit references preserved.
Validation
git diff --checkpassed.