From c875aa6fdd8740f759305ff0fec9917977d019f0 Mon Sep 17 00:00:00 2001 From: Fredrik Svedberg Date: Thu, 6 May 2021 09:53:31 +0200 Subject: [MLBEDSW-4530] Improve --verbose-graph output Improved --verbose-graph output by adding labels to each print. Signed-off-by: Fredrik Svedberg Change-Id: I49039ff6af1c06f49208591f02effa4ff73f982a --- ethosu/vela/nn_graph.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ethosu/vela/nn_graph.py') diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index 677a385a..adc7904f 100644 --- a/ethosu/vela/nn_graph.py +++ b/ethosu/vela/nn_graph.py @@ -359,7 +359,9 @@ class Subgraph: s += "->" + str(dstt)[9:-2] print(s + " " + str(a)) - def print_graph(self): + def print_graph(self, label=None): + if label: + print(f"\n[ {label} ]") print("print_graph()", self.name) all_ops = self.get_all_ops() for idx, op in enumerate(all_ops): @@ -541,9 +543,9 @@ class Graph: for sg in self.subgraphs: sg.print_operators() - def print_graph(self): + def print_graph(self, label=None): for sg in self.subgraphs: - sg.print_graph() + sg.print_graph(label) def print_graph_with_tensors(self): for sg in self.subgraphs: -- cgit v1.2.1