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

Function TEST_CASE

test/api/test_save_load.cpp:28–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26#include "test.hpp"
27
28TEST_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
42TEST_CASE(load_save_json)
43{

Callers

nothing calls this directly

Calls 10

frontMethod · 0.80
parse_onnxFunction · 0.50
saveFunction · 0.50
loadFunction · 0.50
save_argumentFunction · 0.50
load_argumentFunction · 0.50
get_output_shapesMethod · 0.45
sizeMethod · 0.45
sortMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected