Revert "[BugFix][Fusion] Fix graph fusion failure problem (#5253)" (#5667)

### What this PR does / why we need it?

Revert PR 5253 to fix the smoking problem

### Does this PR introduce _any_ user-facing change?

Does not.

### How was this patch tested?

It was tested in the failure case.

Signed-off-by: Rifa <865071616@qq.com>
This commit is contained in:
Fager10086
2026-01-06 21:55:47 +08:00
committed by GitHub
parent 330e25ab1d
commit 77a029979e
9 changed files with 267 additions and 36 deletions

View File

@@ -17,7 +17,6 @@
#
from torch import fx as fx
from vllm.compilation.inductor_pass import get_pass_context
from vllm.compilation.vllm_inductor_pass import VllmInductorPass
from vllm.config import VllmConfig
@@ -33,13 +32,10 @@ class GraphFusionPassManager:
def __init__(self):
self.passes: list[VllmInductorPass] = []
def __call__(self, graph: fx.Graph, compile_range) -> fx.Graph:
compile_range = get_pass_context().compile_range
def __call__(self, graph: fx.Graph, runtime_shape) -> fx.Graph:
for pass_ in self.passes:
if pass_.is_applicable_for_range(compile_range):
if pass_.is_applicable(runtime_shape):
pass_(graph)
graph.recompile()
return graph
def add(self, pass_: VllmInductorPass):