-
Notifications
You must be signed in to change notification settings - Fork 739
Revert tensor.cast
to flow reshape conversion
#18772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ape" (iree-org#18351)" This reverts commit d2e74cd. Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Ian Wood <[email protected]>
Okay, it appears like everything is working. I just need to fix up |
Is the plan adding shape inference to tensor.expand/collapse_shape's canonicalization patterns? cc @nirvedhmeshram who landed the patch |
Yes, I have a WIP pr llvm/llvm-project#112265. Also, It looks like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, yes converting to reshape early was working around an issue of tenor.casts in dispatches at the expense of shape inference, so this way we can do that shape inference on tensors and by not cloning the casts in the dispatches the original issue wont happen. Thanks!
Signed-off-by: Ian Wood <[email protected]>
Given CI runs against onnx ops (https://github.com/iree-org/iree/actions/runs/11336536464/job/31526991018?pr=18772) I think this should be good to merge? |
The CI doesn't really test the full coverage of onnx models but if the IR in the original issue is still compiling, I think this is okay to merge. |
|
Yes, that old IR had that issue so you are good to go. |
Revert
tensor.cast
toflow.tensor.reshape
conversion because this is occurring too early. This happens as early asGlobalOptimization
since Flow CanonicalizerPass is used there. Also, stop cloningtensor::CastOp
s into dispatches.Reverted pr: #18351 Original Issue: #18229