Commit 660336a7 authored by Brian Pickrell's avatar Brian Pickrell
Browse files

Update onnx reducel1_dyn_test for no-axis default

parent 59bbd918
...@@ -4651,6 +4651,7 @@ def reducel1_dyn_test(): ...@@ -4651,6 +4651,7 @@ def reducel1_dyn_test():
return ([node], [x], [y]) return ([node], [x], [y])
@onnx_test @onnx_test
def reducel1_dyn_noaxes_test(): def reducel1_dyn_noaxes_test():
x = helper.make_tensor_value_info('x', TensorProto.FLOAT, [None]) x = helper.make_tensor_value_info('x', TensorProto.FLOAT, [None])
......
...@@ -4466,14 +4466,15 @@ TEST_CASE(reducel1_dyn_test) ...@@ -4466,14 +4466,15 @@ TEST_CASE(reducel1_dyn_test)
{ {
migraphx::program p; migraphx::program p;
auto* mm = p.get_main_module(); auto* mm = p.get_main_module();
// a shape with 4 dynamic dimensions // No axes given in the onnx file. Parser should default to all axes.
auto l0 = mm->add_parameter("x", auto l0 = mm->add_parameter("x",
migraphx::shape{migraphx::shape::float_type, migraphx::shape{migraphx::shape::float_type,
{{3, 3, 0}, {3, 5, 0}, {4, 6, 5}, {5, 7, 6}}}); {{3, 3, 0}, {3, 5, 0}, {4, 6, 5}, {5, 7, 6}}});
auto abs_ins = mm->add_instruction(migraphx::make_op("abs"), l0); auto abs_ins = mm->add_instruction(migraphx::make_op("abs"), l0);
auto sum_ins = auto sum_ins =
mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {}}}), abs_ins); mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {0, 1, 2, 3}}}), abs_ins);
auto sq_ins = mm->add_instruction(migraphx::make_op("squeeze", {{"axes", {}}}), sum_ins); auto sq_ins =
mm->add_instruction(migraphx::make_op("squeeze", {{"axes", {0, 1, 2, 3}}}), sum_ins);
mm->add_return({sq_ins}); mm->add_return({sq_ins});
migraphx::onnx_options options; migraphx::onnx_options options;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment