masahi commented on a change in pull request #7031: URL: https://github.com/apache/tvm/pull/7031#discussion_r535806394
########## 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: Note that you don't have to explicitly pass `targets` if you test against all targets. If `targets` is None, `verify_with_ort_with_inputs` will test on all targets. ---------------------------------------------------------------- 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: us...@infra.apache.org