-
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] Refactor where importer to support dynamic shapes. #7394
Conversation
@soiferj can you take a look at this PR? |
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.
Overall LGTM. Any chance we can add a test where one of the inputs actually has dynamic shapes?
I would definitely like to but wasn't sure what the right way to force dynamic shapes in a model is. I think we would need to compose a composite graph of some dynamic op followed by where, which might be a very ugly test. Do you know a better way to do that? |
My goto has been do throw in a |
Thanks @jwfromm |
…apes. (apache#7394) * Refactor where importer to support dynamic shapes. * Add a test for dynamic where.
…apes. (apache#7394) * Refactor where importer to support dynamic shapes. * Add a test for dynamic where.
…apes. (apache#7394) * Refactor where importer to support dynamic shapes. * Add a test for dynamic where.
The current implementation of
Where
in our importer uses static shape analysis to do broadcasting. Unfortunately, this can break when inputs have dynamic shapes. This PR refactors the analysis to instead support dynamism.