diff --git a/exir/backend/backend_api.py b/exir/backend/backend_api.py index 8d6d30f7903..3d362505170 100644 --- a/exir/backend/backend_api.py +++ b/exir/backend/backend_api.py @@ -351,8 +351,10 @@ def to_backend( # Fall back to deepcopy if no fake mode is found. TODO(T182910699): Remove this fallback. try: fake_edge_program = get_fake_program(edge_program) - except AssertionError as e: - logging.warning(f"No fake mode found for {edge_program.graph_module}: {e}") + except Exception as e: + logging.warning( + f"Error in get_fake_program for graph {edge_program.graph_module}, fallback to deepcopy: {e}" + ) fake_edge_program = copy.deepcopy(edge_program) partitioner_result = partitioner_instance(fake_edge_program) tagged_exported_program = partitioner_result.tagged_exported_program