[Refactor]Refactor of vllm_ascend/distributed module (#5719)

### What this PR does / why we need it?
Based on the RFC:https://github.com/vllm-project/vllm-ascend/issues/5604

This PR is a refactoring of vllm_ascend/distributed, moving all
kv_transfer realtaed codes into a dedicated folder, which has already
been done in vLLM

### Does this PR introduce _any_ user-facing change?
NA

### How was this patch tested?


- vLLM version: v0.13.0
- vLLM main:
2f4e6548ef

---------

Signed-off-by: lty <linhebiwen@gmail.com>
This commit is contained in:
lty
2026-01-15 08:57:40 +08:00
committed by GitHub
parent f34b3b8ee9
commit 295018ec0f
56 changed files with 300 additions and 293 deletions

View File

@@ -10,7 +10,7 @@ fake_store = types.ModuleType("mooncake.store")
fake_store.ReplicateConfig = MagicMock() # type: ignore[attr-defined]
sys.modules["mooncake.store"] = fake_store
from vllm_ascend.distributed.kvpool.backend.mooncake_backend import ( # noqa: E402
from vllm_ascend.distributed.kv_transfer.kv_pool.ascend_store.backend.mooncake_backend import ( # noqa: E402
_convert_to_bytes, _parse_global_segment_size)

View File

@@ -4,7 +4,8 @@ from unittest.mock import MagicMock, patch
import torch
import torch.distributed as dist
from vllm_ascend.distributed.communicator import NPUCommunicator
from vllm_ascend.distributed.device_communicators.npu_communicator import \
NPUCommunicator
class TestNPUCommunicator(unittest.TestCase):