| 54 | } |
| 55 | |
| 56 | TEST_CASE(single) |
| 57 | { |
| 58 | migraphx::shape s{migraphx::shape::float_type, {2, 3, 327680}}; |
| 59 | migraphx::program p1; |
| 60 | { |
| 61 | auto* mm = p1.get_main_module(); |
| 62 | auto x = mm->add_parameter("x", s); |
| 63 | auto rsum = mm->add_instruction(migraphx::make_op("reduce_sum", {{"axes", {2}}}), x); |
| 64 | mm->add_return({rsum}); |
| 65 | } |
| 66 | run_pass(p1); |
| 67 | migraphx::program p2; |
| 68 | { |
| 69 | auto* mm = p2.get_main_module(); |
| 70 | auto x = mm->add_parameter("x", s); |
| 71 | auto rsum = add_reduce( |
| 72 | p2, "main:reduce_sum0_split", {x}, {2}, "assign_add", single_reduce("reduce_sum")); |
| 73 | mm->add_return({rsum}); |
| 74 | } |
| 75 | EXPECT(p1 == p2); |
| 76 | } |
| 77 | |
| 78 | TEST_CASE(fused) |
| 79 | { |
nothing calls this directly
no test coverage detected