Skip to content

Commit b5160cc

Browse files
Arm backend: Broaden exception handling for unsupported ops (#10473)
Previously, only AssertionError, RuntimeError, and ValueError were caught during node translation failures in the TOSA backend. This patch broadens the exception catch to all Exception types to ensure robust error reporting via `dbg_fail()` even for unexpected errors. This change helps avoid silent crashes or unhelpful tracebacks during backend lowering of unsupported or misconfigured nodes. Signed-off-by: Sebastian Larsson <sebastian.larsson@arm.com>
1 parent 9e59c19 commit b5160cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/arm/tosa_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def preprocess( # noqa: C901
125125
# This will only happen if an unpartitioned graph is passed without
126126
# any checking of compatibility.
127127
raise RuntimeError(f"{node.name} is unsupported op {node.op}")
128-
except (AssertionError, RuntimeError, ValueError):
128+
except Exception:
129129
dbg_fail(node, graph_module, tosa_graph, artifact_path)
130130
raise
131131

0 commit comments

Comments
 (0)