### What this PR does / why we need it?
Fixes hang when batch size < DP size.
### Does this PR introduce _any_ user-facing change?
None.
### How was this patch tested?
After this change, the function in DP case will work now.
- vLLM version: v0.10.1.1
- vLLM main:
d9a55204ba
Signed-off-by: Yizhou Liu <liu_yizhou@outlook.com>