(d: dict)
| 125 | |
| 126 | @staticmethod |
| 127 | def from_dict(d: dict) -> "NodeIR": |
| 128 | return NodeIR( |
| 129 | id=d["id"], name=d["name"], step_type=d["step_type"], |
| 130 | reads=[TypedVar.from_dict(r) for r in d["reads"]], |
| 131 | writes=[TypedVar.from_dict(w) for w in d["writes"]], |
| 132 | instruction=d.get("instruction"), |
| 133 | submodule_ref=SubmoduleRef.from_dict(d["submodule_ref"]) if d.get("submodule_ref") else None, |
| 134 | ) |
| 135 | |
| 136 | |
| 137 | # ---------- EdgeIR ---------- |