From 4a79262e0f560c50a9831ee672a853e598047ee5 Mon Sep 17 00:00:00 2001 From: liuzhenwei Date: Thu, 23 Apr 2026 16:22:28 +0800 Subject: [PATCH] [UT][Hardware] let torchrun example tests use the default backend (#39879) Signed-off-by: zhenwei-intel --- tests/distributed/test_torchrun_example.py | 3 ++- tests/distributed/test_torchrun_example_moe.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/distributed/test_torchrun_example.py b/tests/distributed/test_torchrun_example.py index af9c76d9c7..f56d037fa5 100644 --- a/tests/distributed/test_torchrun_example.py +++ b/tests/distributed/test_torchrun_example.py @@ -10,7 +10,8 @@ import torch.distributed as dist from vllm import LLM, SamplingParams from vllm.distributed.parallel_state import get_world_group -dist.init_process_group(backend="gloo") +# Let PyTorch choose the WORLD backend for the current device type. +dist.init_process_group() # Create prompts prompts = [ diff --git a/tests/distributed/test_torchrun_example_moe.py b/tests/distributed/test_torchrun_example_moe.py index c0437d9b93..8c1d00561b 100644 --- a/tests/distributed/test_torchrun_example_moe.py +++ b/tests/distributed/test_torchrun_example_moe.py @@ -10,7 +10,8 @@ import torch.distributed as dist from vllm import LLM, SamplingParams from vllm.distributed.parallel_state import get_tp_group, get_world_group -dist.init_process_group(backend="gloo") +# Let PyTorch choose the WORLD backend for the current device type. +dist.init_process_group() # Create prompts prompts = [