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 2020/12/04 03:34:17 UTC

[GitHub] [tvm] jwfromm commented on a change in pull request #7031: [Relay][Frontend][Onnx] Add support for Size op in Onnx frontend.

jwfromm commented on a change in pull request #7031:
URL: https://github.com/apache/tvm/pull/7031#discussion_r535810837



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -3888,6 +3888,36 @@ def test_if():
             tvm.testing.assert_allclose(correct_out[i], tvm_out[i], rtol=1e-05, atol=1e-05)
 
 
+@tvm.testing.uses_gpu
+def test_size():
+    def verify_size(indata):
+        node = helper.make_node(
+            "Size",
+            inputs=["X"],
+            outputs=["Y"],
+        )
+
+        graph = helper.make_graph(
+            [node],
+            "size_test",
+            inputs=[helper.make_tensor_value_info("X", TensorProto.INT64, list(indata.shape))],
+            outputs=[helper.make_tensor_value_info("Y", TensorProto.INT64, [])],
+        )
+
+        model = helper.make_model(graph, producer_name="size_test")
+
+        for target, _ in tvm.testing.enabled_targets():
+            verify_with_ort_with_inputs(
+                model, [indata], targets=[target], dtype="int64", use_vm=True, opset=11

Review comment:
       Whoops, fixed now. Thanks for pointing that out!




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