AndrewZhaoLuo commented on code in PR #10922:
URL: https://github.com/apache/tvm/pull/10922#discussion_r845740976
##########
python/tvm/relay/transform/fake_quantization_to_integer.py:
##########
@@ -109,6 +109,32 @@ def identity(expr, type_map):
register_unary_identity("image.resize2d")
+@register_fake_quantization_to_integer("abs")
+def abs(expr, type_map):
+ assert len(expr.args) == 1
+ arg = expr.args[0]
+ t = type_map[arg]
+
+ if t.dtype == "int8":
Review Comment:
I suggest you use np.iinfo
e.g.
`np.iinfo('int32').min`
--
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]