LudovicoYIN commented on code in PR #18878:
URL: https://github.com/apache/tvm/pull/18878#discussion_r2893473972
##########
tests/python/relax/test_frontend_onnx.py:
##########
@@ -2700,6 +2700,30 @@ def verify_tile(in_shape, repeats, out_shape):
verify_tile(x.shape, repeats, z_array.shape)
[email protected]("dynamic_input", [True, False])
+def test_tile_dynamic_repeats(dynamic_input):
+ x = np.random.rand(2, 3).astype(np.float32)
+ repeats = np.array([2, 2], dtype=np.int64)
+ out_shape = np.tile(x, repeats).shape
+
+ input_shape = ["?", "?"] if dynamic_input else list(x.shape)
+ output_shape = ["?" for _ in out_shape] if dynamic_input else
list(out_shape)
+
+ node = helper.make_node("Tile", inputs=["input", "repeats"],
outputs=["out"])
+ graph = helper.make_graph(
+ [node],
+ "tile_dynamic_repeats_test",
+ inputs=[
+ helper.make_tensor_value_info("input", TensorProto.FLOAT,
input_shape),
+ helper.make_tensor_value_info("repeats", TensorProto.INT64,
[len(repeats)]),
+ ],
+ outputs=[helper.make_tensor_value_info("out", TensorProto.FLOAT,
output_shape)],
+ )
+ model = helper.make_model(graph, producer_name="tile_dynamic_repeats_test")
+
+ check_correctness(model, inputs={"input": x, "repeats": repeats}, opset=13)
Review Comment:
I expanded the test coverage for dynamic Tile repeats.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]