| 20336 | throw new python.Error(`Unsupported argument '${typ_}'.`); |
| 20337 | } |
| 20338 | deserialize_sym_argument(sym_arg) { |
| 20339 | if (sym_arg instanceof torch._export.serde.schema.SymIntArgument) { |
| 20340 | if (sym_arg.type === 'as_int') { |
| 20341 | return sym_arg.as_int; |
| 20342 | } else if (sym_arg.type === 'as_name') { |
| 20343 | return this.serialized_name_to_node.get(sym_arg.as_name); |
| 20344 | } |
| 20345 | } else if (sym_arg instanceof torch._export.serde.schema.SymFloatArgument) { |
| 20346 | if (sym_arg.type === 'as_float') { |
| 20347 | return sym_arg.as_float; |
| 20348 | } else if (sym_arg.type === 'as_name') { |
| 20349 | return this.serialized_name_to_node.get(sym_arg.as_name); |
| 20350 | } |
| 20351 | } else if (sym_arg instanceof torch._export.serde.schema.SymBoolArgument) { |
| 20352 | if (sym_arg.type === 'as_bool') { |
| 20353 | return sym_arg.as_bool; |
| 20354 | } else if (sym_arg.type === 'as_name') { |
| 20355 | return this.serialized_name_to_node.get(sym_arg.as_name); |
| 20356 | } |
| 20357 | } |
| 20358 | throw new python.Error(`Unsupported symbolic argument type '${sym_arg.type}`); |
| 20359 | } |
| 20360 | deserialize_sym_op_outputs(serialized_node, fx_node) { |
| 20361 | this.sync_fx_node(serialized_node.outputs[0].value.as_name, fx_node); |
| 20362 | } |