[Bugfix][NPU] Register vllm-ascend custom ops in NPUOmniPlatform.set_device (#4712)
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
This commit is contained in:
1 parent
8ddcb3621f
commit
e500c00545
1 file changed
+6
@@ -44,6 +44,12 @@ class NPUOmniPlatform(OmniPlatform, NPUPlatform):
|
||||
@classmethod
|
||||
def set_device(cls, device: torch.device) -> None:
|
||||
super().set_device(device)
|
||||
|
||||
# Register vllm_ascend custom ops (torch.ops._C_ascend.*).
|
||||
from vllm_ascend.utils import enable_custom_op
|
||||
|
||||
enable_custom_op()
|
||||
|
||||
# Ascend quantized weights are converted from ND to FRACTAL_NZ
|
||||
# after loading. Enable internal format so the NZ storage layout
|
||||
# is preserved for fused NPU kernels.
|
||||
|
||||
Reference in new issue
Block a user