{"record":{"id":"a85af9fabea123e2","repo":"vllm-project/vllm","slug":"no-device-communicator-found","errorCode":null,"errorMessage":"No device communicator found","messagePattern":"No device communicator found","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/distributed/elastic_ep/elastic_execute.py","lineNumber":68,"sourceCode":"\nlogger = init_logger(__name__)\n\nif TYPE_CHECKING:\n    from vllm.model_executor.layers.fused_moe.fused_moe_method_base import (\n        FusedMoEMethodBase,\n    )\n\n\ndef batch_transfer_weights(\n    model: nn.Module,\n    is_sender: bool,\n    peer_rank: int,\n    dp_group: StatelessGroupCoordinator,\n    expert_weights: Sequence[Iterable[torch.Tensor]],\n) -> None:\n    device_comm = dp_group.device_communicator\n    if device_comm is None:\n        raise ValueError(\"No device communicator found\")\n\n    expert_weights_set = set()\n    for weight_group in expert_weights:\n        for weight in weight_group:\n            expert_weights_set.add(weight.data_ptr())\n\n    state_dict = model.state_dict()\n    all_params = []\n\n    for name, param in state_dict.items():\n        if name.endswith(\"expert_map\") or name.find(\"._shared_experts\") != -1:\n            continue\n        if param.data_ptr() not in expert_weights_set:\n            all_params.append(param.data)\n\n    assert len(all_params) > 0\n    p2p_ops = []\n    for param in all_params:","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/distributed/elastic_ep/elastic_execute.py#L50-L86","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Ensure the DP group is initialized with a device backend (proper CUDA/XPU init, use_device_communicator enabled) before reconfiguration runs","Check init order: ReconfigureDistributedRequest handling must come after device_communicator setup in the worker","Log/inspect dp_group.device_communicator right after group init to catch the None early","If running CPU-only tests, mock or skip weight transfer rather than exercising this path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert dp_group.device_communicator is not None, (\n    \"elastic EP weight transfer requires an initialized device communicator\"\n)","typeGuard":"def dp_group_ready_for_weight_transfer(dp_group) -> bool:\n    return dp_group.device_communicator is not None","tryCatchPattern":null,"preventionTips":["Verify device communicator init before accepting reconfiguration requests","Initialize groups with the device backend enabled on GPU platforms","Smoke-test a reconfigure cycle after group setup in CI"],"tags":["elastic-ep","distributed","initialization"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}