@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 5867819eaf
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 11, 23:45 UTC

Do not guard during noop elimination pass (#30095)

Signed-off-by: Laith Sakka <lsakka@meta.com>

Laith Sakka committed Dec 4, 2025 at 20:10 UTC 5867819eaffe3c939c0920c15d5048cb7f9129f8
1 file changed +2 -6
vllm/compilation/noop_elimination.py
+2 -6
@@ -5,6 +5,7 @@ from collections.abc import Iterable
5
6 import torch.fx
7 from torch import SymInt
8 +from torch.fx.experimental.symbolic_shapes import statically_known_true
9
10 from vllm.logger import init_logger
11
@@ -116,12 +117,7 @@ class NoOpEliminationPass(VllmInductorPass):
117 2. The dimensions both correspond to the same SymInt
118 """
119 # Case 1
119 - if isinstance(i_dim, int) and isinstance(dim, int):
120 - return dim == i_dim
121 - # Case 2
122 - if isinstance(i_dim, SymInt) and isinstance(dim, SymInt):
123 - return dim == i_dim
124 - return False
120 + return statically_known_true(dim == i_dim)
121
122 def all_dims_equivalent(
123 self, dims: Iterable[int | SymInt], i_dims: Iterable[int | SymInt]