From c38f92aae7878926ff309dc05f584690429e6912 Mon Sep 17 00:00:00 2001 From: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com> Date: Thu, 17 Sep 2026 00:02:39 -0400 Subject: [PATCH] [A2A] Allow EPLB + SharedExpert Overlap + DeepEPv2 (#57236) Signed-off-by: Robert Shaw Signed-off-by: Robert Shaw Co-authored-by: Robert Shaw --- vllm/distributed/device_communicators/all2all.py | 4 ++++ vllm/model_executor/layers/fused_moe/runner/shared_experts.py | 1 + 2 files changed, 5 insertions(+) diff --git a/vllm/distributed/device_communicators/all2all.py b/vllm/distributed/device_communicators/all2all.py index caa3e3386c..0c8ebf3792 100644 --- a/vllm/distributed/device_communicators/all2all.py +++ b/vllm/distributed/device_communicators/all2all.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project +import os import threading from collections.abc import Iterator from contextlib import contextmanager @@ -1048,6 +1049,9 @@ class DeepEPV2All2AllManager(All2AllManagerBase): # missing GIN support. probe = torch.zeros(1, device="cuda") torch.distributed.all_reduce(probe, group=group) + # DeepEPv2 respects EP_DISABLE_GIN, so skip the GIN requirement check. + if os.environ.get("EP_DISABLE_GIN", "0") != "0": + return gin_type = query_nccl_gin_type(group) if gin_type is None: diff --git a/vllm/model_executor/layers/fused_moe/runner/shared_experts.py b/vllm/model_executor/layers/fused_moe/runner/shared_experts.py index 4687cc5469..3b8b6a124f 100644 --- a/vllm/model_executor/layers/fused_moe/runner/shared_experts.py +++ b/vllm/model_executor/layers/fused_moe/runner/shared_experts.py @@ -85,6 +85,7 @@ class SharedExperts(torch.nn.Module): # Both these comm backends have been shown to be safe for shared expert overlap. _EPLB_OVERLAP_SAFE_BACKENDS = ( "allgather_reducescatter", + "deepep_v2", "flashinfer_nvlink_one_sided", )