Skip to content

Commit 105a40f

Browse files
authored
[Minor] Fix false warning when TP=1 (#2674)
1 parent bbe9bd9 commit 105a40f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vllm/model_executor/parallel_utils/custom_all_reduce.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def init_custom_ar() -> None:
2929
return
3030
rank = get_tensor_model_parallel_rank()
3131
world_size = get_tensor_model_parallel_world_size()
32+
if world_size == 1:
33+
# No need to initialize custom allreduce for single GPU case.
34+
return
35+
3236
if world_size not in _SUPPORTED_WORLD_SIZES:
3337
logger.warn(
3438
"Custom allreduce is disabled due to an unsupported world size: "

0 commit comments

Comments
 (0)