-
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] Enable int64 biases for int16 quantized operators #12042
Conversation
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.
Can we add some test cases for this please @leandron 😸
Hello @leandron, I'm working on similar lines & have a model with conv2d_transpose & all the other ops are already supported from your already merged commit. I've made the same changes you've done for conv2d_transpose from this patch, but the dequantize layer at the end is getting int64 input which isn't right. Am I missing something that needs to be changed? Thanks in advance! |
7eb64a3
to
a940412
Compare
In TFlite as of now, biases are set by default to be int64 when int16 quantisation is used. I have this model which was created using the default int16 flow, and can be used to check these internal data types with e.g. Netron |
5b67c87
to
1846d00
Compare
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment. Generated by tvm-bot |
This enables int64 biases for quantized fully connected, requantize and transpose convolution in TFLite networks. It goes on top of existing int16 support for TFLite frontend. Add a test case using DS_CNN int16 quantized. Change-Id: I3006ee76f5037fb6f915818358c9aada2faf40bf
1846d00
to
98568b2
Compare
Please have another look. |
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 looks good to me. Do you know of any links to int16 specs similar to https://www.tensorflow.org/lite/performance/quantization_spec (int8 only)?
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 @leandron, looks good to me!
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 @leandron. LGTM 😄
Sorry for the delay - thanks @leandron 😸 |
This enables int64 biases for quantized fully connected, requantize and transpose convolution in TFLite networks. It goes on top of existing int16 support for TFLite frontend.
cc @areusch for reviews