Skip to content

[RFC]Implement reifyResultShapes for Sub, Mul, and Div ops - #3561

Open
kimm240 wants to merge 2 commits into
onnx:mainfrom
kimm240:rfc-1-2
Open

[RFC]Implement reifyResultShapes for Sub, Mul, and Div ops#3561
kimm240 wants to merge 2 commits into
onnx:mainfrom
kimm240:rfc-1-2

Conversation

@kimm240

@kimm240 kimm240 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add reifyResultShapes for onnx.Sub, onnx.Mul, and onnx.Div using the same broadcast shape logic as onnx.Add (PR [RFC]Introduce Reify IndexExpr Value Provider for ONNX #3520 / ReifyIndexExprValueProvider).
  • Factor shared logic into reifyBroadcastResultShapes and refactor ONNXAddOp to use it.
  • Register Sub/Mul/Div in OpsWithReifyResultShapes and regenerate ONNXOps.td.inc.
  • Rename lit test to onnx_reify_result_shapes.mlir and add Sub/Mul/Div test cases.

Test

  • Removed onnx_reify_result_shapes_add.mlir.
  • Added onnx_reify_result_shapes.mlir as a single lit test file covering Add, Sub, Mul, and Div.

Signed-off-by: Hyun Gyu Kim <kimm240@telepix.net>
@jenkins-droid

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

Signed-off-by: Hyun Gyu Kim <kimm240@telepix.net>
@jenkins-droid

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

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