| 26 | #include "test.hpp" |
| 27 | |
| 28 | TEST_CASE(load_save_default) |
| 29 | { |
| 30 | std::string filename = "migraphx_api_load_save.mxr"; |
| 31 | auto p1 = migraphx::parse_onnx("conv_relu_maxpool_test.onnx"); |
| 32 | auto s1 = p1.get_output_shapes(); |
| 33 | migraphx::save(p1, filename.c_str()); |
| 34 | auto p2 = migraphx::load(filename.c_str()); |
| 35 | auto s2 = p2.get_output_shapes(); |
| 36 | EXPECT(s1.size() == s2.size()); |
| 37 | EXPECT(s1.front() == s2.front()); |
| 38 | EXPECT(p1.sort() == p2.sort()); |
| 39 | std::remove(filename.c_str()); |
| 40 | } |
| 41 | |
| 42 | TEST_CASE(load_save_json) |
| 43 | { |
nothing calls this directly
no test coverage detected