Testing

onnxscript.testing.assert_isomorphic(graph_or_function_1, graph_or_function_2)[source]

Assert two graphs or functions are isomorphic.

onnxscript.testing.assert_isomorphic_function(fn1, fn2)[source]

Assert two functions are isomorphic.

onnxscript.testing.assert_isomorphic_graph(graph1, graph2)[source]

Assert two graphs are isomorphic.

onnxscript.testing.assert_onnx_proto_equal(a: Message | Any, b: Message | Any) None[source]

Assert that two ONNX protos are equal.

Equality is defined as having the same fields with the same values. When a field takes the default value, it is considered equal to the field not being set.

Sequential fields with name opset_import, value_info, and functions are compared disregarding the order of their elements.

Parameters:
  • a – The first ONNX proto.

  • b – The second ONNX proto.