From 26c8e8416589f8f76f16f16483bb2d6aad036dfa Mon Sep 17 00:00:00 2001 From: Rickard Bolin Date: Thu, 11 May 2023 10:53:42 +0000 Subject: 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 --- ethosu/vela/nn_graph.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1