[XPU] Enable XPU eplb (#44987)

Signed-off-by: mayuyuace <qiming1.zhang@intel.com>
Signed-off-by: Qiming Zhang <qiming1.zhang@intel.com>
This commit is contained in:
Qiming Zhang
2026-09-17 13:19:13 +08:00
committed by GitHub
parent 2743dc4f92
commit e6b1a5e5e3
16 changed files with 267 additions and 109 deletions
+4 -1
View File
@@ -10,6 +10,7 @@ from vllm.distributed.eplb.eplb_state import (
compute_logical_maps,
)
from vllm.distributed.eplb.policy.default import DefaultEplbPolicy
from vllm.platforms import current_platform
def test_eplb_load_stats_reduce_across_ranks():
@@ -263,11 +264,13 @@ def test_global_load_balance_fallback():
assert torch.sum(logcnt) == num_replicas
@pytest.mark.parametrize("device", ["cpu", "cuda"])
@pytest.mark.parametrize("device", ["cpu", "cuda", "xpu"])
def test_device_compatibility(device):
"""Test device compatibility."""
if device == "cuda" and not torch.cuda.is_available():
pytest.skip("CUDA not available")
if device == "xpu" and not current_platform.is_xpu():
pytest.skip("XPU not available")
weight = torch.tensor([[10, 20, 30, 40]], device=device)
num_replicas = 6