Revert "[Bug] Dynamo Unsupported due to BasevLLMParameter.torch_function calling disabled super()" (#25681)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
Michael Goin 2025-09-25 12:45:06 -04:00 committed by GitHub
parent e04a1b6b21
commit 916bd9204d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,6 @@ from torch.nn import Parameter
from vllm.distributed import (get_tensor_model_parallel_rank,
get_tensor_model_parallel_world_size)
from vllm.logger import init_logger
from vllm.utils import is_torch_equal_or_newer
__all__ = [
"BasevLLMParameter", "PackedvLLMParameter", "PerTensorScaleParameter",
@ -115,15 +114,6 @@ class BasevLLMParameter(Parameter):
@classmethod
def __torch_function__(cls, func, types, args=(), kwargs=None):
if not is_torch_equal_or_newer("2.8.0"):
logger.warning_once(
"Torch %s detected (<2.8.0): returning NotImplemented in "
"BasevLLMParameter.__torch_function__ to avoid potential "
"TorchDynamo issues.",
torch.__version__,
)
return NotImplemented
if kwargs is None:
kwargs = {}
return super().__torch_function__(func, types, args, kwargs)