".github/vscode:/vscode.git/clone" did not exist on "9b3e2edd30bda2926f38ec114ff82192e8993857"
Unverified Commit 5867819e authored by Laith Sakka's avatar Laith Sakka Committed by GitHub
Browse files

Do not guard during noop elimination pass (#30095)


Signed-off-by: default avatarLaith Sakka <lsakka@meta.com>
parent 7c9b2c8f
......@@ -5,6 +5,7 @@ from collections.abc import Iterable
import torch.fx
from torch import SymInt
from torch.fx.experimental.symbolic_shapes import statically_known_true
from vllm.logger import init_logger
......@@ -116,12 +117,7 @@ class NoOpEliminationPass(VllmInductorPass):
2. The dimensions both correspond to the same SymInt
"""
# Case 1
if isinstance(i_dim, int) and isinstance(dim, int):
return dim == i_dim
# Case 2
if isinstance(i_dim, SymInt) and isinstance(dim, SymInt):
return dim == i_dim
return False
return statically_known_true(dim == i_dim)
def all_dims_equivalent(
self, dims: Iterable[int | SymInt], i_dims: Iterable[int | SymInt]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment