MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / throws_shape

Function throws_shape

test/op_shape_test.cpp:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55template <class... Ts>
56static void throws_shape(const migraphx::operation& op, Ts... xs)
57{
58 migraphx::program p;
59 auto* mm = p.get_main_module();
60 std::vector<migraphx::shape> shapes{xs...};
61 std::vector<migraphx::instruction_ref> args(shapes.size());
62 std::transform(
63 shapes.begin(), shapes.end(), args.begin(), [&](auto&& s) { return mm->add_outline(s); });
64 bool thrown = test::throws([&] { mm->add_instruction(op, args); });
65 if(not thrown)
66 {
67 std::cout << "FAILED: No error found for " << op.name() << ": ";
68 for(auto&& s : shapes)
69 std::cout << " " << s << std::endl;
70 }
71}
72
73template <class...>
74struct always_false : std::false_type

Callers 4

TEST_CASEFunction · 0.85
test_softmax_variationsFunction · 0.85
test_reduce_opsFunction · 0.85
test_dyn_reduce_opsFunction · 0.85

Calls 8

get_main_moduleMethod · 0.80
add_outlineMethod · 0.80
transformFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
add_instructionMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected