We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 199e93a commit d5a83a5Copy full SHA for d5a83a5
torch/_export/serde/serialize.py
@@ -1037,7 +1037,11 @@ def deserialize_optional_tensor_args(a):
1037
raise SerializeError(f"Unhandled argument {inp}")
1038
1039
def deserialize_sym_argument(self, sym_int_arg):
1040
- return self.serialized_name_to_node[sym_int_arg.as_name]
+ if sym_int_arg.type == "as_int":
1041
+ return sym_int_arg.as_int
1042
+ else:
1043
+ assert sym_int_arg.type == "as_name"
1044
+ return self.serialized_name_to_node[sym_int_arg.as_name]
1045
1046
def deserialize_sym_op_outputs(self, serialized_node: Node, fx_node: torch.fx.Node):
1047
self.sync_fx_node(serialized_node.outputs[0].value.as_name, fx_node)
0 commit comments