Unverified Commit 916bd920 authored by Michael Goin's avatar Michael Goin Committed by GitHub
Browse files

Revert "[Bug] Dynamo Unsupported due to `BasevLLMParameter.torch_function`...


Revert "[Bug] Dynamo Unsupported due to `BasevLLMParameter.torch_function` calling disabled super()" (#25681)
Signed-off-by: default avataryewentao256 <zhyanwentao@126.com>
Co-authored-by: default avatarWentao Ye <44945378+yewentao256@users.noreply.github.com>
parent e04a1b6b
...@@ -12,7 +12,6 @@ from torch.nn import Parameter ...@@ -12,7 +12,6 @@ from torch.nn import Parameter
from vllm.distributed import (get_tensor_model_parallel_rank, from vllm.distributed import (get_tensor_model_parallel_rank,
get_tensor_model_parallel_world_size) get_tensor_model_parallel_world_size)
from vllm.logger import init_logger from vllm.logger import init_logger
from vllm.utils import is_torch_equal_or_newer
__all__ = [ __all__ = [
"BasevLLMParameter", "PackedvLLMParameter", "PerTensorScaleParameter", "BasevLLMParameter", "PackedvLLMParameter", "PerTensorScaleParameter",
...@@ -115,15 +114,6 @@ class BasevLLMParameter(Parameter): ...@@ -115,15 +114,6 @@ class BasevLLMParameter(Parameter):
@classmethod @classmethod
def __torch_function__(cls, func, types, args=(), kwargs=None): 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: if kwargs is None:
kwargs = {} kwargs = {}
return super().__torch_function__(func, types, args, kwargs) return super().__torch_function__(func, types, args, kwargs)
......
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