Skip to content

Commit 0f23dea

Browse files
committed
fix patch
1 parent 353ecf6 commit 0f23dea

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

vllm_ascend/patch/worker/patch_common/patch_weight_loader.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ def create_weights(self, layer: torch.nn.Module, input_size_per_partition: int,
3939
set_weight_attrs(weight, extra_weight_attrs)
4040

4141

42+
@classmethod
43+
def __torch_function__(cls, func, types, args=(), kwargs=None):
44+
if kwargs is None:
45+
kwargs = {}
46+
return super().__torch_function__(func, types, args, kwargs)
47+
48+
4249
if not vllm_version_is("0.10.2"):
4350
from vllm.model_executor.layers.linear import UnquantizedLinearMethod
4451
UnquantizedLinearMethod.create_weights = create_weights
52+
from vllm.model_executor.parameter import BasevLLMParameter
53+
BasevLLMParameter.__torch_function__ = __torch_function__

0 commit comments

Comments
 (0)