""" vllm_npu — Ascend NPU platform plugin for vLLM. The ``register()`` function is discovered by vLLM through the ``vllm.platform_plugins`` entry-point and returns the fully-qualified class name of the platform implementation. """ def register(): """Return the fully-qualified name of the NPU platform class.""" # Apply CUDA→NPU compatibility patches early so that any code # referencing torch.cuda.Stream / Event / etc. will transparently # be redirected to the torch.npu equivalents. from vllm_npu.cuda_compat import _patch_cuda_to_npu _patch_cuda_to_npu() return "vllm_npu.platform.NPUPlatform"