feat: Implement the NPU platform plugin for vLLM, including platform registration, device management, custom operations, and configuration adaptation.

This commit is contained in:
2026-02-10 22:05:06 +08:00
parent 4ca9d52cf2
commit 5bef2da1f1
2 changed files with 10 additions and 7 deletions

View File

@@ -180,6 +180,10 @@ class NPUPlatform(Platform):
"""Adapt vLLM configuration for NPU hardware."""
from vllm.config import CompilationLevel
# Register NPU custom ops (must happen after platform is detected)
from vllm_npu import register_npu_ops
register_npu_ops()
parallel_config = vllm_config.parallel_config
cache_config = vllm_config.cache_config
compilation_config = vllm_config.compilation_config