Revert "[inductor][invoke_subgraph] Free the buffers before the subgraph call (#152494)"

This reverts commit 5236a8506c.

Reverted https://github.com/pytorch/pytorch/pull/152494 on behalf of https://github.com/malfet due to Broke CI, see 52cbcac640/1 ([comment](https://github.com/pytorch/pytorch/pull/152384#issuecomment-2845099985))
This commit is contained in:
PyTorch MergeBot 2025-05-01 15:46:07 +00:00
parent 52cbcac640
commit 2fa39e60ed

View File

@ -2910,10 +2910,6 @@ class PythonWrapperCodegen(CodeGen):
self.writeline(f"{subgraph.graph.name}_args = [{outer_input_names}]")
# Since the buffers are already put into the args list, we can free the
# buffers here.
V.graph.scheduler.free_buffers()
# Call the subgraph launcher function
self.writeline(
f"{outer_buffer_name} = {subgraph.graph.name}({subgraph.graph.name}_args)"