[inductor] Remove Node.last_usage mutation (#139365)

I can't figure out why this is needed.  Let's see if tests fail.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/139365
Approved by: https://github.com/shunting314
ghstack dependencies: #139364
This commit is contained in:
Jason Ansel
2024-11-03 15:22:29 -08:00
committed by PyTorch MergeBot
parent d189f92eb1
commit 66d5e2405d
2 changed files with 0 additions and 9 deletions

View File

@ -1457,9 +1457,6 @@ class SIMDScheduling(BaseScheduling):
)
for pn, nodes in zip(node_group, fused_node_lists):
if only_gen_src_code:
for n in nodes:
n.last_usage = OrderedSet()
self.codegen_node_schedule_with_kernel(
node_schedule_map[pn][0],
kernel.create_sub_kernel(subkernel_map[pn]),
@ -1663,9 +1660,6 @@ class SIMDScheduling(BaseScheduling):
return False
def generate_kernel_code_from_nodes(self, nodes, benchmark_kernel=False):
for n in nodes:
n.last_usage = OrderedSet()
if not nodes[0].is_template():
_, (numel, rnumel) = max(nodes, key=lambda x: int(x.is_reduction())).group
node_schedule = self.generate_node_schedule(nodes, numel, rnumel)

View File

@ -475,9 +475,6 @@ class BaseSchedulerNode:
V.kernel.mutations.add(input_buf.get_name())
V.kernel.mutations.add(buf.get_name())
# update last usage of reused node
self.last_usage.discard(input_buf.get_name())
V.kernel.inplace_update_buffers[
buf.get_name()
] = input_buf.get_name()