qonnx.analysis.topology (module)
- qonnx.analysis.topology.all_tensors_f32(model)
Checks whether all tensors have a float32 dtype, extra quantization annotations notwithstanding.
Returns {“all_tensors_f32”: Bool}.
- qonnx.analysis.topology.get_per_tensor_fanouts(model)
Returns a dictionary of {tensor_name: tensor_fanout} for the model.
- qonnx.analysis.topology.is_linear(model)
Checks whether the given model graph is linear. This is done by looking at the fan-out of each tensor. All tensors have a fan-out <= 1 in a linear graph.
Returns {“is_linear”: Bool}.
- qonnx.analysis.topology.node_inputs_in_expected_order(model)
Verifies that the node inputs are ordered in the way that QONNX expects them. When a node has a mixture of static (= constant, initialized) inputs and dynamic inputs, the dynamic input should come first, followed by the static one. Only verifiable for a small subset of op_types for now.
Returns {“node_inputs_in_expected_order”: Bool}.
- qonnx.analysis.topology.nodes_topologically_sorted(model)
Verifies that graph.node is topologically sorted. This is required by the ONNX specification.
Returns {“nodes_topologically_sorted”: Bool}.