You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/05/25 20:30:44 UTC

[GitHub] [tvm] comaniac commented on a change in pull request #8131: [TensorRT] Fixed access to pad_value

comaniac commented on a change in pull request #8131:
URL: https://github.com/apache/tvm/pull/8131#discussion_r639172302



##########
File path: python/tvm/relay/op/contrib/tensorrt.py
##########
@@ -723,8 +723,12 @@ def pad_annotate_fn(expr):  # pylint: disable=unused-variable
     if attrs.pad_mode != "constant":
         logger.info("nn.pad: pad mode is %s but must be constant.", attrs.pad_mode)
         return False
-    if float(attrs.pad_value) != 0.0:
-        logger.info("nn.pad: pad value is %f but must be 0.0.", float(attrs.pad_value))
+    if (
+        isinstance(args[1], relay.Constant)

Review comment:
       Is it possible for `args[1]` to be an `Expr`? If not, then this should be an assertion.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org