vllm-project/vllm · error · ValueError

No device communicator found

Error message

No device communicator found

What it means

batch_transfer_weights() (elastic expert-parallelism weight transfer during reconfiguration) sends/receives expert weights peer-to-peer over the DP group's device communicator. StatelessGroupCoordinator.device_communicator is None when the group was created without a device backend (CPU-only group, or device communicator init skipped), and there is no transport to move tensors, so it raises ValueError.

Source

Thrown at vllm/distributed/elastic_ep/elastic_execute.py:68

logger = init_logger(__name__)

if TYPE_CHECKING:
    from vllm.model_executor.layers.fused_moe.fused_moe_method_base import (
        FusedMoEMethodBase,
    )


def batch_transfer_weights(
    model: nn.Module,
    is_sender: bool,
    peer_rank: int,
    dp_group: StatelessGroupCoordinator,
    expert_weights: Sequence[Iterable[torch.Tensor]],
) -> None:
    device_comm = dp_group.device_communicator
    if device_comm is None:
        raise ValueError("No device communicator found")

    expert_weights_set = set()
    for weight_group in expert_weights:
        for weight in weight_group:
            expert_weights_set.add(weight.data_ptr())

    state_dict = model.state_dict()
    all_params = []

    for name, param in state_dict.items():
        if name.endswith("expert_map") or name.find("._shared_experts") != -1:
            continue
        if param.data_ptr() not in expert_weights_set:
            all_params.append(param.data)

    assert len(all_params) > 0
    p2p_ops = []
    for param in all_params:

View on GitHub (pinned to c794754062)

Solutions

  1. Ensure the DP group is initialized with a device backend (proper CUDA/XPU init, use_device_communicator enabled) before reconfiguration runs
  2. Check init order: ReconfigureDistributedRequest handling must come after device_communicator setup in the worker
  3. Log/inspect dp_group.device_communicator right after group init to catch the None early
  4. If running CPU-only tests, mock or skip weight transfer rather than exercising this path
Defensive patterns

Strategy: validation

Validate before calling

assert dp_group.device_communicator is not None, (
    "elastic EP weight transfer requires an initialized device communicator"
)

Type guard

def dp_group_ready_for_weight_transfer(dp_group) -> bool:
    return dp_group.device_communicator is not None

Prevention

When it happens

Trigger: Running elastic EP reconfiguration where the dp_group was initialized without a device/NCCL communicator; groups built with use_device_communicator=False or on CPU; passing a group whose device_communicator attribute was never set because distributed init env vars (e.g. distributed backend) were missing.

Common situations: Elastic EP setups on platforms lacking the device communicator; init order bugs where reconfigure requests arrive before the device communicator is initialized; tests using StatelessGroupCoordinator without a real backend.

Related errors


AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14). Data as JSON: /api/errors/a85af9fabea123e2. Report an issue: GitHub.