Skip to content

Commit 2210c23

Browse files
authored
Update test_backend.py
1 parent 4ab432a commit 2210c23

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_backend.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,14 @@ def func(x, y):
10751075
return tf.identity(x_, name=_TFOUTPUT)
10761076
self._run_test_case(func, [_OUTPUT], {_INPUT: x_val, _INPUT1: x_val}, rtol=1e-5)
10771077

1078+
def test_matmulinteger(self):
1079+
x_val = np.array([1, 2, -3, -4], dtype=np.int8).reshape((2, 2))
1080+
y_val = np.array([1, 2, -3, -4], dtype=np.int8).reshape((2, 2))
1081+
def func(x, y):
1082+
x_ = tf.matmul(x, y, output_type=tf.int32)
1083+
return tf.identity(x_, name=_TFOUTPUT)
1084+
self._run_test_case(func, [_OUTPUT], {_INPUT: x_val, _INPUT1: y_val})
1085+
10781086
@check_onnxruntime_incompatibility("Sub")
10791087
def test_sub(self):
10801088
x_val = np.array([1.0, 2.0, -3.0, -4.0], dtype=np.float32).reshape((2, 2))

0 commit comments

Comments
 (0)