| 20714 | this.registerType('executorch.exir.serde.serialize.GraphModuleDeserializer', class extends torch._export.serde.serialize.GraphModuleDeserializer { |
| 20715 | deserialize_operator(serialized_target) { |
| 20716 | const find_operator = (module, target) => { |
| 20717 | const names = target.split('.').slice(5); |
| 20718 | let node = module; |
| 20719 | for (const name of names) { |
| 20720 | node = builtins.getattr(node, name); |
| 20721 | if (!node) { |
| 20722 | return target; |
| 20723 | } |
| 20724 | } |
| 20725 | return node; |
| 20726 | }; |
| 20727 | const ops = executorch.exir.dialects._ops.ops; |
| 20728 | if (serialized_target.startsWith('executorch.exir.dialects.edge.ops')) { |
| 20729 | return find_operator(builtins.getattr(ops, 'edge'), serialized_target); |