[torch.compile] Fix tests for torch==2.9 inductor partition (#26116)
Signed-off-by: ProExpertProg <lgovedic@redhat.com> Signed-off-by: Luka Govedič <lgovedic@redhat.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import contextlib
|
||||
import logging
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from torch._library.utils import lookup_op
|
||||
@@ -38,8 +39,16 @@ def resolve_defined_ops(op_names: list[str]) -> list["torch._ops.OpOverload"]:
|
||||
resolved.append(lookup_op(op_name))
|
||||
except Exception:
|
||||
# Skip operators that don't exist (e.g., model-specific ops)
|
||||
logger.warning(
|
||||
"Failed to resolve operator for Inductor partition: %s", op_name
|
||||
# Do not warn for attention ops, warn for others
|
||||
# (most likely manually specified)
|
||||
from vllm.config import CompilationConfig
|
||||
|
||||
logger.log(
|
||||
logging.DEBUG
|
||||
if op_name in CompilationConfig._attention_ops
|
||||
else logging.WARNING,
|
||||
"Failed to resolve operator for CUDAGraph partition: %s",
|
||||
op_name,
|
||||
)
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user