Skip to content

Commit

Permalink
reuse smaller test case for verify
Browse files Browse the repository at this point in the history
  • Loading branch information
kahmed10 committed Jan 17, 2025
1 parent a5c22fa commit ada1625
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions test/onnx/gen_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,23 @@ def convinteger_dual_bias_test():
return ([node], [x, y, z, w], [out])


@onnx_test()
def convinteger_dual_bias_simple_test():
x = helper.make_tensor_value_info('0', TensorProto.INT8, [1, 3, 5, 5])
y = helper.make_tensor_value_info('1', TensorProto.INT8, [1, 3, 2, 2])
z = helper.make_tensor_value_info('2', TensorProto.INT8, [1])
w = helper.make_tensor_value_info('3', TensorProto.INT8, [1])
out = helper.make_tensor_value_info('4', TensorProto.INT32, [1, 1, 4, 4])

node = onnx.helper.make_node('ConvInteger',
inputs=['0', '1', '2', '3'],
outputs=['4'],
dilations=[1, 1],
strides=[1, 1])

return ([node], [x, y, z, w], [out])


@onnx_test()
def convinteger_mismatched_input_types_test():
x = helper.make_tensor_value_info('0', TensorProto.INT8, [1, 3, 32, 32])
Expand Down
3 changes: 2 additions & 1 deletion test/onnx/verify/quant_convolution_dual_bias_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

TEST_CASE(quant_convolution_dual_zero_bias_test)
{
migraphx::program p = read_onnx("convinteger_dual_bias_test.onnx");
// TODO: use other dual_bias test, verify with other framework once convinteger supported
migraphx::program p = read_onnx("convinteger_dual_bias_simple_test.onnx");
p.compile(migraphx::make_target("ref"));

migraphx::shape a{migraphx::shape::int8_type, {1, 3, 5, 5}};
Expand Down

0 comments on commit ada1625

Please sign in to comment.