Skip to content

Conversation

@leo-pony
Copy link
Collaborator

@leo-pony leo-pony commented Nov 28, 2025

What this PR does / why we need it?

fix dp parallel + tp > 1 offline inference port conflict

issue import PR:#429

Does this PR introduce any user-facing change?

How was this patch tested?

@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@leo-pony leo-pony changed the title fix dp parallel + tp > 1 offline inference port conflict [Bugfix] fix dp parallel + tp > 1 offline inference port conflict Nov 28, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a port conflict issue that occurs during offline inference in distributed environments using both data parallelism and tensor parallelism (tp > 1). The change removes a monkey-patch for ParallelConfig.get_next_dp_init_port that was causing this conflict. The removed code attempted to manage data parallel ports by incrementing a counter on the ParallelConfig instance. This approach is not safe across multiple processes, as each process would have its own instance and counter, leading to race conditions and port collisions. By deleting this faulty patch, the code now relies on the default port allocation mechanism from the underlying vLLM framework, which should correctly handle multi-process scenarios. This is a clean and effective fix for the described problem.

@leo-pony leo-pony added ready read for review ready-for-test start test by label for PR and removed ready read for review ready-for-test start test by label for PR labels Nov 29, 2025
@wangxiyuan wangxiyuan merged commit a3041cd into vllm-project:main Nov 29, 2025
21 of 22 checks passed
ChenCangtao pushed a commit to ChenCangtao/vllm-ascend that referenced this pull request Dec 3, 2025
…lm-project#4539)

### What this PR does / why we need it?
fix dp parallel + tp > 1 offline inference port conflict

issue import PR:vllm-project#429


- vLLM version: v0.11.2
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.2

---------

Signed-off-by: leo-pony <[email protected]>
Mercykid-bash pushed a commit to Mercykid-bash/vllm-ascend that referenced this pull request Dec 4, 2025
…lm-project#4539)

### What this PR does / why we need it?
fix dp parallel + tp > 1 offline inference port conflict

issue import PR:vllm-project#429

- vLLM version: v0.11.2
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.2

---------

Signed-off-by: leo-pony <[email protected]>
Signed-off-by: Che Ruan <[email protected]>
Mercykid-bash pushed a commit to Mercykid-bash/vllm-ascend that referenced this pull request Dec 4, 2025
…lm-project#4539)

### What this PR does / why we need it?
fix dp parallel + tp > 1 offline inference port conflict

issue import PR:vllm-project#429

- vLLM version: v0.11.2
- vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.2

---------

Signed-off-by: leo-pony <[email protected]>
Signed-off-by: Che Ruan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:tests ready read for review ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants