[MLBEDSW-4530] Improve --verbose-graph output
Improved --verbose-graph output by adding labels to each print.
Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Change-Id: I49039ff6af1c06f49208591f02effa4ff73f982a
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py
index 677a385..adc7904 100644
--- a/ethosu/vela/nn_graph.py
+++ b/ethosu/vela/nn_graph.py
@@ -359,7 +359,9 @@
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 @@
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: