| 31 | #include <test.hpp> |
| 32 | |
| 33 | TEST_CASE(identity_test) |
| 34 | { |
| 35 | migraphx::program p; |
| 36 | auto* mm = p.get_main_module(); |
| 37 | migraphx::shape s{migraphx::shape::float_type, {2, 2}}; |
| 38 | std::vector<int> data{1, 2, 3, 4}; |
| 39 | auto l = mm->add_literal(migraphx::literal{s, data}); |
| 40 | mm->add_instruction(migraphx::make_op("identity"), l); |
| 41 | p.compile(migraphx::make_target("ref")); |
| 42 | auto result = p.eval({}).back(); |
| 43 | std::vector<int> results_vector(4); |
| 44 | result.visit([&](auto output) { results_vector.assign(output.begin(), output.end()); }); |
| 45 | EXPECT(std::equal(data.begin(), data.end(), results_vector.begin())); |
| 46 | } |
| 47 | |
| 48 | TEST_CASE(identity_dyn_test) |
| 49 | { |
nothing calls this directly
no test coverage detected