-
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
Support negative pad values #7375
Conversation
Please add a unit test |
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.
Thanks @codeislife99 ! It looks good to me, but could you also add a test case in test_op_level2.py
?
Added relevant test cases. |
@anijain2305 @trevor-m Does anyone have any idea of how to solve this ? Should we display a warning whenever we encounter negative padding ? |
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.
When handling the dynamic shape, you need to improve the shape function to check if the shape after padding is still legal on the fly. If it cannot be simply covered in this PR, we can focus on the static shape first and still throw out errors for negative padding values when the shape is dynamic.
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.
LGTM
Thanks @codeislife99 @comaniac @trevor-m This is merged |
* Support negative pad values * Update test_op_level2.py * Update pad.cc * Update test_op_level2.py * PR Comments * Update pad.cc * Address PR Comments * CI Error * CI Error * CI Error Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-115.us-east-2.compute.internal>
* Support negative pad values * Update test_op_level2.py * Update pad.cc * Update test_op_level2.py * PR Comments * Update pad.cc * Address PR Comments * CI Error * CI Error * CI Error Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-115.us-east-2.compute.internal>
* Support negative pad values * Update test_op_level2.py * Update pad.cc * Update test_op_level2.py * PR Comments * Update pad.cc * Address PR Comments * CI Error * CI Error * CI Error Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-115.us-east-2.compute.internal>
Negative pad values error out currently. This PR removes it and handles the error correctly for negative pad values.