-
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
[QNN][TFLite] Added support for fused-bias and quantized input in TRANSPOSE_CONV for TFLite. #6523
Conversation
…NSPOSE_CONV for TFLite. * Added dilation_value attribute to dilate operator of Relay/TOPI. (Enables custom value for dilation, instead of always 0) * Added tests for dilation_value of dilate operator in Relay and TOPI. * Added support for quantized input in TRANSPOSE_CONV operator of TFLite. * Added tests for quantized input in TRANSPOSE_CONV operator of TFLite.
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.
Looks almost there to me. Could we see if there's a hosted model somewhere with a transpose convolution in that we can test with? Also ping @giuseros as I know you're familiar with the maths behind this.
also ping @siju-samuel |
Dilation part is good. I am not sure about the conv2d transpose portion. My concern is that we now have to replicate the logic for different framework parsers. My suggestion would be to add For now, we can make the transformation for all targets, not just specifically to ARM. This will keep the option open to improve the schedule of conv2d_transpose as a whole if needed. |
Quantized Transpose Convolution code needs some changes, so bringing |
This work is based on @jainris initial PR: apache#6523 I added a relay.qnn.conv2d_transpose node. The strategy I followed is to convert to int16 and invoke nn.conv2d_transpose (which already exists in relay). Main changes: - The node declaration lives in relay/qnn/op/convolution_transpose.cc - Cast int8->int16 and subsequent offset removal is in tvm/relay/qnn/op/legalizations.py. - I added and tested the operator in the tflite front-end - I added a unit-test in Relay for qnn.conv2d_transpose
This work is based on @jainris initial PR: apache#6523 I added a relay.qnn.conv2d_transpose node. The strategy I followed is to convert to int16 and invoke nn.conv2d_transpose (which already exists in relay). Main changes: - The node declaration lives in relay/qnn/op/convolution_transpose.cc - Cast int8->int16 and subsequent offset removal is in tvm/relay/qnn/op/legalizations.py. - I added and tested the operator in the tflite front-end - I added a unit-test in Relay for qnn.conv2d_transpose Co-authored-by: Rishabh Jain
This work is based on @jainris initial PR: apache#6523 I added a relay.qnn.conv2d_transpose node. The strategy I followed is to convert to int16 and invoke nn.conv2d_transpose (which already exists in relay). Main changes: - The node declaration lives in relay/qnn/op/convolution_transpose.cc - Cast int8->int16 and subsequent offset removal is in tvm/relay/qnn/op/legalizations.py. - I added and tested the operator in the tflite front-end - I added a unit-test in Relay for qnn.conv2d_transpose Co-authored-by: Rishabh Jain
This work is based on @jainris initial PR: apache#6523 I added a relay.qnn.conv2d_transpose node. The strategy I followed is to convert to int16 and invoke nn.conv2d_transpose (which already exists in relay). Main changes: - The node declaration lives in relay/qnn/op/convolution_transpose.cc - Cast int8->int16 and subsequent offset removal is in tvm/relay/qnn/op/legalizations.py. - I added and tested the operator in the tflite front-end - I added a unit-test in Relay for qnn.conv2d_transpose Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com>
* Add initial support for quantized transpose convolution in Relay This work is based on @jainris initial PR: #6523 I added a relay.qnn.conv2d_transpose node. The strategy I followed is to convert to int16 and invoke nn.conv2d_transpose (which already exists in relay). Main changes: - The node declaration lives in relay/qnn/op/convolution_transpose.cc - Cast int8->int16 and subsequent offset removal is in tvm/relay/qnn/op/legalizations.py. - I added and tested the operator in the tflite front-end - I added a unit-test in Relay for qnn.conv2d_transpose Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com> * Fix linting * Addressing review comments Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com>
…che#6899) * Add initial support for quantized transpose convolution in Relay This work is based on @jainris initial PR: apache#6523 I added a relay.qnn.conv2d_transpose node. The strategy I followed is to convert to int16 and invoke nn.conv2d_transpose (which already exists in relay). Main changes: - The node declaration lives in relay/qnn/op/convolution_transpose.cc - Cast int8->int16 and subsequent offset removal is in tvm/relay/qnn/op/legalizations.py. - I added and tested the operator in the tflite front-end - I added a unit-test in Relay for qnn.conv2d_transpose Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com> * Fix linting * Addressing review comments Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com>
…che#6899) * Add initial support for quantized transpose convolution in Relay This work is based on @jainris initial PR: apache#6523 I added a relay.qnn.conv2d_transpose node. The strategy I followed is to convert to int16 and invoke nn.conv2d_transpose (which already exists in relay). Main changes: - The node declaration lives in relay/qnn/op/convolution_transpose.cc - Cast int8->int16 and subsequent offset removal is in tvm/relay/qnn/op/legalizations.py. - I added and tested the operator in the tflite front-end - I added a unit-test in Relay for qnn.conv2d_transpose Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com> * Fix linting * Addressing review comments Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com>
…che#6899) * Add initial support for quantized transpose convolution in Relay This work is based on @jainris initial PR: apache#6523 I added a relay.qnn.conv2d_transpose node. The strategy I followed is to convert to int16 and invoke nn.conv2d_transpose (which already exists in relay). Main changes: - The node declaration lives in relay/qnn/op/convolution_transpose.cc - Cast int8->int16 and subsequent offset removal is in tvm/relay/qnn/op/legalizations.py. - I added and tested the operator in the tflite front-end - I added a unit-test in Relay for qnn.conv2d_transpose Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com> * Fix linting * Addressing review comments Co-authored-by: Rishabh Jain <jainris@users.noreply.github.com>
(Enables custom value for dilation, instead of always 0)