Skip to content

Remove pad and identity rewrite - #1432

Merged
Zhenchao Ni (zhenchaoni) merged 1 commit into
release/v0.4.0from
private/zhenni/remove_rewrite_rules
Sep 21, 2026
Merged

Zhenchao Ni (zhenchaoni) merged 1 commit into
release/v0.4.0from
private/zhenni/remove_rewrite_rules

Conversation

@zhenchaoni

Copy link
Copy Markdown
Member

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.

@zhenchaoni
Zhenchao Ni (zhenchaoni) requested a review from a team as a code owner September 21, 2026 07:14
@zhenchaoni
Zhenchao Ni (zhenchaoni) merged commit 855fe5c into release/v0.4.0 Sep 21, 2026
9 checks passed
@zhenchaoni
Zhenchao Ni (zhenchaoni) deleted the private/zhenni/remove_rewrite_rules branch September 21, 2026 07:27
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.

1 participant