-
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
Register Shape Func for Some Operators to Handle Dynamic Shapes #5955
Conversation
Register the shape function for `floor` operator. Otherwise, a bug will happen when input of floor is any.
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.
Could you add test cases for crop_and_resize
and mirror_pad
in tests/python/relay/test_any.py?
@icemelon9 I have added test case for And there is something I may need to illustrate further. According to the |
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. just two minor comments.
Thanks @lsy643 |
…he#5955) * Register Shape Func for Floor Operator Register the shape function for `floor` operator. Otherwise, a bug will happen when input of floor is any. * Register shape func for log * add shape function for crop_and_size * change import location * add mirror_pad shape function * add test cases for crop_and_resize and mirror_pad shape funcs * support different layout * fix pylint error * fix pylint error * add test for nchw layout * block nchw test * test for nchw * use tvm.testing.assert_allclose instead Co-authored-by: lisiyuan <lisiyuan@nucflow>
…he#5955) * Register Shape Func for Floor Operator Register the shape function for `floor` operator. Otherwise, a bug will happen when input of floor is any. * Register shape func for log * add shape function for crop_and_size * change import location * add mirror_pad shape function * add test cases for crop_and_resize and mirror_pad shape funcs * support different layout * fix pylint error * fix pylint error * add test for nchw layout * block nchw test * test for nchw * use tvm.testing.assert_allclose instead Co-authored-by: lisiyuan <lisiyuan@nucflow>
…he#5955) * Register Shape Func for Floor Operator Register the shape function for `floor` operator. Otherwise, a bug will happen when input of floor is any. * Register shape func for log * add shape function for crop_and_size * change import location * add mirror_pad shape function * add test cases for crop_and_resize and mirror_pad shape funcs * support different layout * fix pylint error * fix pylint error * add test for nchw layout * block nchw test * test for nchw * use tvm.testing.assert_allclose instead Co-authored-by: lisiyuan <lisiyuan@nucflow>
…he#5955) * Register Shape Func for Floor Operator Register the shape function for `floor` operator. Otherwise, a bug will happen when input of floor is any. * Register shape func for log * add shape function for crop_and_size * change import location * add mirror_pad shape function * add test cases for crop_and_resize and mirror_pad shape funcs * support different layout * fix pylint error * fix pylint error * add test for nchw layout * block nchw test * test for nchw * use tvm.testing.assert_allclose instead Co-authored-by: lisiyuan <lisiyuan@nucflow>
In order to deal with dynamic shapes occurs when compiling a object detection model like Faster Rcnn, many operators need shape functions for ManifestAlloc pass.
Several shape functions have been created or registered: