Commit 59bbd918 authored by Brian Pickrell's avatar Brian Pickrell
Browse files

formatting

parent 0e2ea59d
...@@ -4447,12 +4447,13 @@ TEST_CASE(reducel1_dyn_test) ...@@ -4447,12 +4447,13 @@ 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 // a shape with 4 dynamic dimensions
auto l0 = mm->add_parameter( auto l0 = mm->add_parameter("x",
"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 = mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {-2}}}), abs_ins); auto sum_ins =
auto sq_ins = mm->add_instruction(migraphx::make_op("squeeze", {{"axes", {-2}}}), sum_ins); mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {-2}}}), abs_ins);
auto sq_ins = mm->add_instruction(migraphx::make_op("squeeze", {{"axes", {-2}}}), sum_ins);
mm->add_return({sq_ins}); mm->add_return({sq_ins});
migraphx::onnx_options options; migraphx::onnx_options options;
...@@ -4466,17 +4467,18 @@ TEST_CASE(reducel1_dyn_test) ...@@ -4466,17 +4467,18 @@ 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 // a shape with 4 dynamic dimensions
auto l0 = mm->add_parameter( auto l0 = mm->add_parameter("x",
"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 = mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {}}}), abs_ins); auto sum_ins =
auto sq_ins = mm->add_instruction(migraphx::make_op("squeeze", {{"axes", {}}}), sum_ins); mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {}}}), abs_ins);
auto sq_ins = mm->add_instruction(migraphx::make_op("squeeze", {{"axes", {}}}), sum_ins);
mm->add_return({sq_ins}); mm->add_return({sq_ins});
migraphx::onnx_options options; migraphx::onnx_options options;
options.map_dyn_input_dims["x"] = {{3, 3}, {3, 5}, {4, 6, 5}, {5, 7, 6}}; options.map_dyn_input_dims["x"] = {{3, 3}, {3, 5}, {4, 6, 5}, {5, 7, 6}};
auto prog = migraphx::parse_onnx("reducel1_dyn_noaxes_test.onnx", options); auto prog = migraphx::parse_onnx("reducel1_dyn_noaxes_test.onnx", options);
EXPECT(p == prog); EXPECT(p == prog);
} }
......
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