Skip to content

Update shape operator inference for opset 15 with start and end attributes#28075

Open
royudit wants to merge 1 commit intomicrosoft:mainfrom
royudit:royudit/bugfix_symbolic_shape_inference_shape_op
Open

Update shape operator inference for opset 15 with start and end attributes#28075
royudit wants to merge 1 commit intomicrosoft:mainfrom
royudit:royudit/bugfix_symbolic_shape_inference_shape_op

Conversation

@royudit
Copy link
Copy Markdown

@royudit royudit commented Apr 15, 2026

Description

Fixes a bug in symbolic shape inference class where shape operator inference was done without using start and end attributes for opset 15 or greater.

Motivation and Context

  • Symbolic shape inference using dynamic axes and torch export with dynamo fails as shape operator infer function.
  • The shape operator in its actual implementation returns the full shape tensor (ignoring the start and end attributes) leading to failed auto merging of dimensions emerging from the _merge_symbols function.
  • This modification/bugfix makes the infer shape function compatible with pytorch dynamo export graph and the resulting model can be quantized successfully.

@royudit
Copy link
Copy Markdown
Author

royudit commented Apr 15, 2026

@microsoft-github-policy-service agree company="MyScript"

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