From dd4f4bb47d260d5773bbe917c66ad15b42eebf6d Mon Sep 17 00:00:00 2001 From: Angela Yi Date: Mon, 26 Jun 2023 18:05:27 +0000 Subject: [PATCH] [exir] Initial serialization (#103763) Summary: ETRecord can't use this yet because the other programs need to be migrated to using ExportedProgram (D46729844) Note: higher order ops like call_delegate/cond are also not supported yet Test Plan: `buck2 run @//mode/dev-nosan //executorch/exir/tests:serde` Differential Revision: D46802454 Pull Request resolved: https://github.com/pytorch/pytorch/pull/103763 Approved by: https://github.com/tarun292 --- torch/_export/serde/serialize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/_export/serde/serialize.py b/torch/_export/serde/serialize.py index 69f74f3da2e..8cb264a31ed 100644 --- a/torch/_export/serde/serialize.py +++ b/torch/_export/serde/serialize.py @@ -450,7 +450,7 @@ class GraphModuleSerializer: node_args = node.args[0] if isinstance(node_args, torch.fx.Node): node_args = (node_args,) - assert isinstance(node_args, tuple) + assert isinstance(node_args, (tuple, list)) self.graph_state.outputs = [self.serialize_input(arg) for arg in node_args] def handle_call_function(self, node: torch.fx.Node):