cconvey commented on a change in pull request #9186:
URL: https://github.com/apache/tvm/pull/9186#discussion_r721539028
##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -1282,6 +1282,45 @@ def verify_batch_matmul(a_shape, b_shape, out_shape,
convert_config=None):
)
[email protected]_targets
+def test_matmulinteger16(target, dev):
+ def verify_matmulinteger16(a_shape, b_shape, out_shape):
+ a_dtype = "int16"
+ b_dtype = "int16"
+ low = -10
+ high = 10
+
+ a_proto = TensorProto.INT16
+ b_proto = TensorProto.INT16
+ out_proto = TensorProto.INT32
+ a_array = np.random.randint(low, high, size=a_shape).astype(a_dtype)
+ b_array = np.random.randint(low, high, size=b_shape).astype(b_dtype)
+
+ mul_node = helper.make_node("MatMulInteger16", ["a", "b"], ["out"],
domain="com.microsoft")
+
+ graph = helper.make_graph(
+ [mul_node],
+ "matmuli16_test",
+ inputs=[
+ helper.make_tensor_value_info("a", a_proto, list(a_shape)),
+ helper.make_tensor_value_info("b", b_proto, list(b_shape)),
+ ],
+ outputs=[helper.make_tensor_value_info("out", out_proto,
list(out_shape))],
+ )
+
+ model = helper.make_model(graph, producer_name="matmuli16_test")
+ verify_with_ort_with_inputs(model, [a_array, b_array], target=target,
dev=dev)
+
+ # Working tests
Review comment:
Not sure if I'm in the minority, but it's not obvious why the particular
tests below were chosen. So it's hard to notice if there are any redundancies
or gaps in the coverage they provide. Would it make sense to add some comments
indicating the purpose some/all of them serve?
--
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]