-
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
[TFLite][Frontend] Fix test failures caused by div-by-zero #15844
Conversation
@Lunderberg hi! sorry to bug. is this PR still needed? |
@p3achyjr Thank you for the reminder, and it would still be good to get this PR in, even if re-enabling the flaky |
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.
Thank you for making the changes, and LGTM!
@Lunderberg thanks for getting back!! |
raise ZeroDivisionError("Input range is 0.") | ||
|
||
# only compute for rhs. | ||
quant_scale = 255 / (inq1_max - inq1_min) |
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.
Shouldn't there be a dependency on the data type for the value 255? Since the data type can be int8, int16.
Tests were failing b/c TVM and TFLite disagree on div-by-zero cases.
floor_mod still fails, this is probably a behaviorial difference.
#15148