| 35 | |
| 36 | template <class... Ts> |
| 37 | static void expect_shape(const migraphx::shape& expected, const migraphx::operation& op, Ts... xs) |
| 38 | { |
| 39 | migraphx::program p; |
| 40 | auto* mm = p.get_main_module(); |
| 41 | std::vector<migraphx::shape> shapes{xs...}; |
| 42 | std::vector<migraphx::instruction_ref> args(shapes.size()); |
| 43 | std::transform( |
| 44 | shapes.begin(), shapes.end(), args.begin(), [&](auto&& s) { return mm->add_outline(s); }); |
| 45 | mm->add_instruction(op, args); |
| 46 | if(p.get_output_shapes().back() != expected) |
| 47 | { |
| 48 | std::cout << "FAILED: Incorrect shape for " << op << ": "; |
| 49 | std::cout << expected << " != " << p.get_output_shapes().back() << std::endl; |
| 50 | for(auto&& s : shapes) |
| 51 | std::cout << " " << s << std::endl; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | template <class... Ts> |
| 56 | static void throws_shape(const migraphx::operation& op, Ts... xs) |
no test coverage detected