aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRickard Bolin <rickard.bolin@arm.com>2023-05-11 10:53:42 +0000
committerRickard Bolin <rickard.bolin@arm.com>2023-09-06 07:49:32 +0000
commit26c8e8416589f8f76f16f16483bb2d6aad036dfa (patch)
treece89b68d3de26fd591ec9d89be1654331f3395f6
parent24570f098bd765842a4c9bc56e28f22295073467 (diff)
downloadethos-u-vela-26c8e8416589f8f76f16f16483bb2d6aad036dfa.tar.gz
MLBEDSW-7541: Extend error message when reaching maximum recursion depth
Extend the error message of RecursionError when reaching default recursion depth with instructions to use the "--recursion-limit" option in Vela. Change-Id: I5c92d49b99203268c4b988f421afe7013ac3511a Signed-off-by: Rickard Bolin <rickard.bolin@arm.com>
-rw-r--r--ethosu/vela/nn_graph.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py
index 6dc6b58..50266d5 100644
--- a/ethosu/vela/nn_graph.py
+++ b/ethosu/vela/nn_graph.py
@@ -302,7 +302,13 @@ class Subgraph:
assert tens in pred_cpass.outputs
def refresh_after_modification(self):
- self.update_consumers()
+ try:
+ self.update_consumers()
+ except RecursionError as e:
+ raise RecursionError(
+ "Compilation failed due to exceeding the default maximum recursion depth.\n"
+ 'Try increasing the maximum recursion depth with the "--recursion-limit" option.'
+ ) from e
def prune_startup_init_pass(self):
assert len(self.passes) >= 1