Skip to content

Commit 529031a

Browse files
committed
choose reduce scatter over reduce
Signed-off-by: Siyuan Fu <[email protected]>
1 parent c86564b commit 529031a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/distributed/device_communicators/cuda_communicator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def reduce_scatterv(
225225
output_shape, dtype=input_tensor.dtype, device=input_tensor.device
226226
)
227227

228-
if sizes is not None:
228+
if sizes is not None and sizes.count(sizes[0]) != len(sizes):
229229
pynccl_comm.reduce_scatterv(output, input_tensor, sizes=sizes)
230230
else:
231231
pynccl_comm.reduce_scatter(output, input_tensor)

0 commit comments

Comments
 (0)