| 89 | } |
| 90 | |
| 91 | static migraphx::program create_scatter_elements_program2(const std::string& reduction_mode, |
| 92 | int axis) |
| 93 | { |
| 94 | migraphx::program p; |
| 95 | auto* mm = p.get_main_module(); |
| 96 | migraphx::shape sd{migraphx::shape::float_type, {1, 5}}; |
| 97 | std::vector<float> vd({1., 2., 3., 4., 5.}); |
| 98 | |
| 99 | migraphx::shape si{migraphx::shape::int32_type, {1, 2}}; |
| 100 | std::vector<int> vi = {1, 3}; |
| 101 | |
| 102 | migraphx::shape su{migraphx::shape::float_type, {1, 2}}; |
| 103 | std::vector<float> vu = {1.1, 2.1}; |
| 104 | |
| 105 | auto ld = mm->add_literal(migraphx::literal{sd, vd}); |
| 106 | auto li = mm->add_literal(migraphx::literal{si, vi}); |
| 107 | auto lu = mm->add_literal(migraphx::literal{su, vu}); |
| 108 | auto r = mm->add_instruction( |
| 109 | migraphx::make_op("scatter_" + reduction_mode, {{"axis", axis}}), ld, li, lu); |
| 110 | mm->add_return({r}); |
| 111 | return p; |
| 112 | } |
| 113 | |
| 114 | TEST_CASE(scatter_elements_none_axis_1_test) |
| 115 | { |
no test coverage detected