(meta_val, fx_node, arg, idx)
| 20379 | deserialize_multiple_outputs(serialized_node, fx_node) { |
| 20380 | const deserialized_metadata = this.deserialize_metadata(serialized_node.metadata); |
| 20381 | const generate_getitem = (meta_val, fx_node, arg, idx) => { |
| 20382 | let name = ''; |
| 20383 | if (arg instanceof torch._export.serde.schema.TensorArgument) { |
| 20384 | name = arg.name; |
| 20385 | } else if (arg instanceof torch._export.serde.schema.SymIntArgument) { |
| 20386 | name = arg.as_name; |
| 20387 | } else if (arg instanceof torch._export.serde.schema.SymFloatArgument) { |
| 20388 | name = arg.as_name; |
| 20389 | } else { |
| 20390 | throw new python.Error(`Unsupported argument type '${arg}'.`); |
| 20391 | } |
| 20392 | const individual_output = this.graph.create_node( |
| 20393 | 'call_function', |
| 20394 | operator.getitem, |
| 20395 | new builtins.tuple([fx_node, idx]), |
| 20396 | null, |
| 20397 | name, |
| 20398 | ); |
| 20399 | this.sync_fx_node(name, individual_output); |
| 20400 | meta_val.push(this.serialized_name_to_meta.get(name)); |
| 20401 | individual_output.meta.update(deserialized_metadata); |
| 20402 | }; |
| 20403 | const generate_getitems = (meta_val, fx_node, args) => { |
| 20404 | for (let idx = 0; idx < args.length; idx++) { |
| 20405 | const arg = args[idx]; |
nothing calls this directly
no test coverage detected