AndrewZhaoLuo commented on a change in pull request #9982:
URL: https://github.com/apache/tvm/pull/9982#discussion_r788130953



##########
File path: tests/python/relay/test_pass_fake_quantization_to_integer.py
##########
@@ -303,6 +303,19 @@ def test_fake_quantize_global_avg_pool():
     compare_fq_to_int(op, [x_np], True)
 
 
+def test_fake_quantize_rsqrt():
+    x = relay.var("x", shape=[1, 3, 224, 224], dtype="int8")
+    zero = relay.const(0)
+
+    x = relay.qnn.op.dequantize(x, relay.const(2.0), zero)
+    op = relay.rsqrt(x)
+    op = relay.qnn.op.quantize(op, relay.const(2.0), zero)
+
+    x_np = np.random.randint(-128, 127, size=[1, 3, 224, 224], dtype="int8")
+
+    compare_fq_to_int(op, [x_np], True)

Review comment:
       Huh, shouldn't this fail? since the default lowering matches the 
fake-quantized version and the comparison function makes sure they aren't the 
same structure




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to