-
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
[Relay][Frontend][Onnx] Allow A to B broadcasting of batch_matmul and reverse strided slice #6681
Conversation
@mbrookhart @masahi can you guys take a look at this PR? |
There is an error from auto schedular test. Not sure if it is related or flaky |
It seems very unlikely that these changes would cause that error. I'll try to rebuild. It looks like it passes locally as well. |
hey @comaniac @merrymercy can you check if the error from evolutionary search test https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/PR-6681/1/pipeline/ can be flaky? |
@masahi It seems to be an internal bug of the auto-scheduler rather than a flaky test. |
Thanks @jwfromm @mbrookhart |
… reverse strided slice (apache#6681) * slice and batch_matmul fixes. * Bug fix in shape inference. * Test backwards strided slice. * Fix batch_matmul dynamic shape function. * formatting. * Fix edge case for implicit broadcast
… reverse strided slice (apache#6681) * slice and batch_matmul fixes. * Bug fix in shape inference. * Test backwards strided slice. * Fix batch_matmul dynamic shape function. * formatting. * Fix edge case for implicit broadcast
… reverse strided slice (apache#6681) * slice and batch_matmul fixes. * Bug fix in shape inference. * Test backwards strided slice. * Fix batch_matmul dynamic shape function. * formatting. * Fix edge case for implicit broadcast
… reverse strided slice (apache#6681) * slice and batch_matmul fixes. * Bug fix in shape inference. * Test backwards strided slice. * Fix batch_matmul dynamic shape function. * formatting. * Fix edge case for implicit broadcast
This PR contains two otherwise unrelated bug fixes / improvements that allow us to import a class of segmentation models using the Onnx frontend.
The first is the ability to broadcast the batch dimension of the left hand side argument of
batch_matmul
to to the right hand side argument, where we previously only allowed rhs to lhs broadcasting. There are a few bug fixes in relay to enable this.The second is a fix to our strided slice shape inference to allow reverse slicing, specifically when the end is a negative number, indicating that we should iterate all the way to the first element. A test case in relay is added to catch this in the future.
Finally, I removed some unneeded type inference and shape checking in padding.