Skip to content

Add initial support for quantized transpose convolution in Relay#6899

Merged
mbaret merged 3 commits intoapache:mainfrom
giuseros:qnn_conv2d_transpose
Nov 26, 2020
Merged

Add initial support for quantized transpose convolution in Relay#6899
mbaret merged 3 commits intoapache:mainfrom
giuseros:qnn_conv2d_transpose

Conversation

@giuseros
Copy link
Copy Markdown
Contributor

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

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>
@giuseros
Copy link
Copy Markdown
Contributor Author

cc @anijain2305 @u99127

Comment thread python/tvm/relay/qnn/op/legalizations.py Outdated
Comment thread python/tvm/relay/qnn/op/legalizations.py Outdated
Comment thread python/tvm/relay/qnn/op/qnn.py
Comment thread python/tvm/relay/qnn/op/qnn.py Outdated
Comment thread python/tvm/relay/qnn/op/qnn.py Outdated
Comment thread python/tvm/relay/qnn/op/qnn.py Outdated
Comment thread src/relay/qnn/op/convolution_transpose.cc Outdated
Comment thread src/relay/qnn/op/convolution_transpose.cc Outdated
Comment thread tests/python/frontend/tflite/test_forward.py
@mbaret mbaret self-assigned this Nov 23, 2020
@mbaret
Copy link
Copy Markdown
Contributor

mbaret commented Nov 23, 2020

cc @siju-samuel @FrozenGene if you're interested

Copy link
Copy Markdown
Contributor

@mbaret mbaret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mbaret mbaret merged commit 093629c into apache:main Nov 26, 2020
@mbaret
Copy link
Copy Markdown
Contributor

mbaret commented Nov 26, 2020

Thanks @giuseros and @jainris !

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 2, 2020
…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>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 4, 2020
…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>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Dec 4, 2020
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants