Icemist commented on a change in pull request #10239:
URL: https://github.com/apache/tvm/pull/10239#discussion_r808577865
##########
File path: tests/python/relay/test_pass_fake_quantization_to_integer.py
##########
@@ -627,3 +628,217 @@ def conv2d(expr, type_map): # pylint:
disable=unused-variable
# Catch a generic exception because the tvm FFI eats the python exception
type
with pytest.raises(Exception):
mod_int =
tvm.relay.transform.FakeQuantizationToInteger(hard_fail=True)(mod)
+
+
+def compare_expected_fq_to_int(expr, expected_expr, args,
allow_rounding_error=False):
+ mod = tvm.IRModule.from_expr(expr)
+ mod_def = tvm.relay.transform.InferType()(mod)
+ mod_int = tvm.relay.transform.FakeQuantizationToInteger(False)(mod_def)
+ mod_exp =
tvm.relay.transform.InferType()(tvm.IRModule.from_expr(expected_expr))
+ print("mod_def\n", mod_def, "\n")
Review comment:
Deleted.
--
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]