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/12/14 02:10:14 UTC

[GitHub] [tvm] ganler commented on a change in pull request #9582: [BugFix] resolve integer 32. ~ 64. mismatch by casting

ganler commented on a change in pull request #9582:
URL: https://github.com/apache/tvm/pull/9582#discussion_r757714983



##########
File path: tests/python/relay/test_type_solver.py
##########
@@ -338,6 +341,34 @@ def test_incompatible_quantified_func_unification():
     solver.Unify(ft1, ft2)
 
 
+def test_integer_compatibility_in_layout_transform():
+    x = relay.var("data", shape=(2, 3, 48, 48), dtype="float32")
+    conv_out = relay.nn.conv2d(
+        x,
+        relay.var("weight", shape=(1, 3, 1, 1), dtype="float32"),
+        strides=[47, 47],
+        padding=[0, 0, 0, 0],
+        channels=1,
+        kernel_size=[1, 1],
+    )
+    bias_out = relay.nn.bias_add(conv_out, relay.var("bias"))
+    broadcast_out = relay.op.broadcast_to(bias_out, relay.const([2, 1, 2, 2], dtype="int64"))

Review comment:
       This relay script is minimal equivalence to the onnx file to trigger the bug. The onnx model is generated by PyTorch and TVM will let the target shape of broadcast be of `int64`.




-- 
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: commits-unsubscribe@tvm.apache.org

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