-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[ONNX] only broadcast matmul if the shape has changed #10321
Conversation
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
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.
Lowering to a null op is very interesting behavior. We should make sure to fix that eventually.. This work around in the meantime makes sense to me.
Can we make a tracking issue for this? |
We might have to poke around a little more to figure out the issue. I wasn't able to replicate a failure using a dedicated script with useless
Do we expect that to trigger the issue or is it more nuanced? |
I haven't been able to isolate the problem from the model yet, but we'll work to do that offline, reproduce as a test, and then file the issue |
Thanks @AndrewZhaoLuo @jwfromm |
* [ONNX] only broadcast matmul if the shape has changed * fix copy-pasta mistake
cc @AndrewZhaoLuo @jwfromm
#9911 introduced some extra broadcasting to handle edge cases in shapes. In cases where the broadcasted shape matched the input shape, this ended up being a null op that caused some issues with a model I've been testing.
I think the issue is deeper in how broadcast_to is lowered, but removing the unnecessary broadcast also fixes my bug, so I'm punting and adding the deeper issue to my backlog.