Skip to content
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] Dynamic scale, zero point in qnn.op.dequantize #6849

Merged
merged 11 commits into from
Nov 6, 2020

Conversation

electriclilies
Copy link
Contributor

This PR allows the qnn.op.dequantize op to accept dynamic scales and zero points. #6782 made similar changes to the qnn.quantize op.

I also added unit tests to the qnn testing to make sure that the dynamic scale and zero points work for both quantize and dequantize.

@jwfromm @masahi Please take a look

@@ -29,6 +29,9 @@
import tvm
import tvm.testing
from tvm import relay
from tvm.contrib import graph_runtime
Copy link
Member

@masahi masahi Nov 4, 2020

Choose a reason for hiding this comment

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

This is a test script for pytorch frontend... Please move these changes to relay/test_op_qnn_dequantize.py and relay/test_op_qnn_quantize.py

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved - thanks for pointing that out

@masahi masahi merged commit b31f4ae into apache:main Nov 6, 2020
@masahi
Copy link
Member

masahi commented Nov 6, 2020

thanks @electriclilies

@electriclilies electriclilies deleted the dequantize_expr_scale branch November 6, 2020 05:57
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 2, 2020
* add dynamic dequantize

* register quantize and dequantize as opaque

* make tests better

* black

* remove main fn

* fix black again

* move tests

* fix import

* fix import again

* try again

* fix import
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 4, 2020
* add dynamic dequantize

* register quantize and dequantize as opaque

* make tests better

* black

* remove main fn

* fix black again

* move tests

* fix import

* fix import again

* try again

* fix import
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Dec 4, 2020
* add dynamic dequantize

* register quantize and dequantize as opaque

* make tests better

* black

* remove main fn

* fix black again

* move tests

* fix import

* fix import again

* try again

* fix import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants