| 27 | #include <onnx_test.hpp> |
| 28 | |
| 29 | TEST_CASE(resize_downsample_linear_dyn_test) |
| 30 | { |
| 31 | using migraphx::half; |
| 32 | migraphx::onnx_options options; |
| 33 | options.map_dyn_input_dims = {{"X", {{1, 1}, {1, 1}, {2, 3}, {4, 8}}}}; |
| 34 | migraphx::program p = read_onnx("resize_downsample_linear_half_test.onnx", options); |
| 35 | p.compile(migraphx::make_target("ref")); |
| 36 | |
| 37 | migraphx::shape sx{migraphx::shape::half_type, {1, 1, 2, 4}}; |
| 38 | std::vector<half> dx = {half{1}, half{2}, half{3}, half{4}, half{5}, half{6}, half{7}, half{8}}; |
| 39 | |
| 40 | migraphx::parameter_map pp; |
| 41 | pp["X"] = migraphx::argument(sx, dx.data()); |
| 42 | |
| 43 | auto result = p.eval(pp).back(); |
| 44 | std::vector<half> result_vector; |
| 45 | result.visit([&](auto output) { result_vector.assign(output.begin(), output.end()); }); |
| 46 | |
| 47 | // Expected output was calculated without any quantization |
| 48 | std::vector<half> gold = {half{2.8333333}, half{4.833333}}; |
| 49 | |
| 50 | EXPECT(migraphx::verify::verify_rms_range(result_vector, gold)); |
| 51 | } |
nothing calls this directly
no test coverage detected