Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vllm/config/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ def compute_hash(self):
# Derived/runtime topology, networking, or launch details
"data_parallel_rank",
"data_parallel_rank_local",
"data_parallel_size_local",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This change correctly allows running an API-only server with data_parallel_size_local=0. However, this change may expose a latent bug in the nnodes_within_dp property (line 417). This property calculates self.data_parallel_size // self.data_parallel_size_local without checking if data_parallel_size_local is zero. If a code path on the API server process were to access this property, it would result in a ZeroDivisionError. While your tests indicate this path isn't currently triggered for your use case, this creates a risk of crashes in other scenarios or future changes. A follow-up change to make nnodes_within_dp safe against division by zero would be advisable to improve robustness.

"data_parallel_backend",
"data_parallel_external_lb",
"data_parallel_hybrid_lb",
Expand Down