[Operator] Add dynamic shape support and tests for Operators. #274
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Altered operators and added the associated test for dynamic shape support.
Changed:
However, there are certain shape checks that are not possible for dynamic dimensions during compile time, I have skipped over those for now; the shape checks will not happen if its dynamic, but I think its a definite must for the future.
Some difficulties arise comes when resolve rules rely on shapes, short-term fix would be to resolve to default implementation if shape is dynamic, long term would probably be to add conditionals to graph IR, however, this may not play very nicely with fusion...
Similarly, long term fix for operators and task mappings would probably be to add some sort of 'assert' node to the IR, so that assertions gets added to the launch function in codegen.