| 28 | #include "test.hpp" |
| 29 | |
| 30 | TEST_CASE(check_undefined) |
| 31 | { |
| 32 | migraphx::module m; |
| 33 | auto und = m.add_instruction(migraphx::make_op("undefined")); |
| 34 | auto cov = m.add_instruction( |
| 35 | migraphx::make_op("convert", {{"target_type", migraphx::shape::half_type}}), und); |
| 36 | auto abs = m.add_instruction(migraphx::make_op("abs"), cov); |
| 37 | |
| 38 | migraphx::shape xs{migraphx::shape::float_type, {2, 3}}; |
| 39 | std::vector<float> datax = {1, 2, 3, 4, 5, 6}; |
| 40 | |
| 41 | auto lit = m.add_literal(migraphx::literal(xs, datax)); |
| 42 | auto mul = m.add_instruction(migraphx::make_op("mul"), lit, lit); |
| 43 | |
| 44 | EXPECT(und->is_undefined()); |
| 45 | EXPECT(cov->is_undefined()); |
| 46 | EXPECT(abs->is_undefined()); |
| 47 | EXPECT(not lit->is_undefined()); |
| 48 | EXPECT(not mul->is_undefined()); |
| 49 | } |
| 50 | |
| 51 | TEST_CASE(check_replace_shape) |
| 52 | { |
nothing calls this directly
no test coverage detected