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

Function test_save_load_buffer

test/py/test_save_load.py:43–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 assert p1.sort() == p2.sort()
42
43def test_save_load_buffer():
44 p1 = migraphx.parse_onnx("conv_relu_maxpool_test.onnx")
45 print(p1)
46
47 s1 = p1.get_output_shapes()[-1]
48
49 p1_bytes = migraphx.save_buffer(p1)
50 assert isinstance(p1_bytes, bytes)
51
52 p2 = migraphx.load_buffer(p1_bytes)
53 print(p2)
54 s2 = p2.get_output_shapes()[-1]
55
56 assert s1 == s2
57 assert p1.sort() == p2.sort()
58
59
60def create_buffer(t, data, shape):

Callers 1

test_save_load.pyFile · 0.85

Calls 3

printFunction · 0.50
get_output_shapesMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected