diff options
-rw-r--r-- | ethosu/vela/nn_graph.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index 6dc6b583..50266d5f 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 |