Skip to content

Commit

Permalink
Revised intermediary removal
Browse files Browse the repository at this point in the history
  • Loading branch information
ddilbazTT committed Nov 7, 2024
1 parent 551dc63 commit 5ba0879
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tt_torch/dynamo/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,17 @@ def run_gm_op_by_op(self, *inputs):
del node_to_tensor[arg]
out_degree.pop(arg)
# Handle any intermediaries left - might be redundant
intermediates = [node for node, users in out_degree.items() if users == 0 and node.op != "output"]
intermediates = [
node
for node, users in out_degree.items()
if users == 0 and node.op != "output"
]
for node in intermediates:
del node_to_tensor[node]

self.compiler_config.save_unique_ops()
return outputs



def __call__(self, *inputs):
if self.compiler_config.compile_depth == CompileDepth.EXECUTE:
assert self.binary is not None, "Binary must be set for EXECUTE mode"
Expand Down

0 comments on commit 5ba0879

Please sign in to comment.