-
Notifications
You must be signed in to change notification settings - Fork 56
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
[optimizer] Collapse Slice
s
#1758
Comments
Yes, it can be optimized. Do you know where it is coming from? Just wondering if some change in source onnxscript function is also possible. |
This is coming from the aten slice ops when there are indexed assignments I believe. So they are from pytorch. |
Found this in a timm model called ghostnet_100, which in onnx_dynamo, it generates 3 slices, while in torchscript, we only use 1. This can be repro on benchmark. cc @xadupre |
Investigated more and found these op.Slice should probably be no op, since it's not slicing anything based on the output shape.. |
The optimizer currently does not collapse these slices, but there has to be a way to remove them I think?
The text was updated successfully, but these errors were encountered: