diff --git a/tools/onnx-graphsurgeon/onnx_graphsurgeon/ir/graph.py b/tools/onnx-graphsurgeon/onnx_graphsurgeon/ir/graph.py index f785a553..1ebd1cf7 100644 --- a/tools/onnx-graphsurgeon/onnx_graphsurgeon/ir/graph.py +++ b/tools/onnx-graphsurgeon/onnx_graphsurgeon/ir/graph.py @@ -409,6 +409,7 @@ def add_local_producers(tensor): except RecursionError: G_LOGGER.critical("Cycle detected in graph! Are there tensors with duplicate names in the graph?") + hierarchy_levels[self._get_node_id(node)] = HierarchyDescriptor(node, level=max_input_level+1) return max_input_level + 1 with self.node_ids():