mirror of
https://github.com/vllm-project/vllm.git
synced 2026-07-30 10:27:59 +00:00
[Test] Skip DeepEP MoE layer tests without P2P access (#47946)
Signed-off-by: Tyler Michael Smith <[email protected]> Signed-off-by: Tyler Michael Smith <[email protected]> Co-authored-by: Claude <[email protected]>
This commit is contained in:
co-authored by
Claude
parent
7c67da967f
commit
99a85617bf
@@ -36,6 +36,9 @@ from vllm.distributed import (
|
||||
get_eplb_group,
|
||||
tensor_model_parallel_all_gather,
|
||||
)
|
||||
from vllm.distributed.device_communicators.all_reduce_utils import (
|
||||
gpu_p2p_access_check,
|
||||
)
|
||||
from vllm.distributed.eplb.eplb_communicator import create_eplb_communicator
|
||||
from vllm.distributed.eplb.rebalance_execute import rearrange_expert_weights_inplace
|
||||
from vllm.forward_context import set_forward_context
|
||||
@@ -106,6 +109,8 @@ if has_deep_ep():
|
||||
if has_nixl_ep():
|
||||
BACKENDS += ["nixl_ep"]
|
||||
|
||||
DEEPEP_BACKENDS = {"deepep_high_throughput", "deepep_low_latency"}
|
||||
|
||||
QUANT_METHODS = [
|
||||
None,
|
||||
"fp8",
|
||||
@@ -416,6 +421,22 @@ def generate_valid_test_configs(
|
||||
return configs
|
||||
|
||||
|
||||
@functools.cache
|
||||
def visible_devices_have_peer_access(world_size: int) -> bool:
|
||||
if not current_platform.is_cuda():
|
||||
return True
|
||||
|
||||
try:
|
||||
return all(
|
||||
gpu_p2p_access_check(src, dst)
|
||||
for src in range(world_size)
|
||||
for dst in range(world_size)
|
||||
if src != dst
|
||||
)
|
||||
except RuntimeError:
|
||||
return False
|
||||
|
||||
|
||||
# TODO: break this up into sections
|
||||
def is_valid_config(config: MoETestConfig) -> tuple[bool, str | None]:
|
||||
# routed_input_transform only makes sense with shared_experts (latent MoE)
|
||||
@@ -1802,6 +1823,9 @@ def test_moe_layer(
|
||||
if enable_eplb and not use_ep:
|
||||
pytest.skip("EPLB requires EP.")
|
||||
|
||||
if backend in DEEPEP_BACKENDS and not visible_devices_have_peer_access(world_size):
|
||||
pytest.skip("DeepEP backends require peer access between visible GPUs.")
|
||||
|
||||
verbosity = pytestconfig.getoption("verbose")
|
||||
|
||||
if os.environ.get("VLLM_LOGGING_LEVEL") is None:
|
||||
|
||||
Reference in New Issue
Block a user