Skip to content

[Misc] Fix enable_sequence_parallelism in PassConfig#4767

Closed
MengqingCao wants to merge 1 commit intovllm-project:mainfrom
MengqingCao:fixsp
Closed

[Misc] Fix enable_sequence_parallelism in PassConfig#4767
MengqingCao wants to merge 1 commit intovllm-project:mainfrom
MengqingCao:fixsp

Conversation

@MengqingCao
Copy link
Copy Markdown
Collaborator

@MengqingCao MengqingCao commented Dec 8, 2025

What this PR does / why we need it?

Fix enable_sequence_parallelism in PassConfig
after vllm-project/vllm#29646, PassConfig.enable_sequence_parallelism is renamed to PassConfig.enable_sp, but it dosen't be included in vLLM v0.12.0, we need to make compatibility for it

How was this patch tested?

CI passed with existing test.

Signed-off-by: MengqingCao <cmq0113@163.com>
Copy link
Copy Markdown
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 aims to add compatibility for the enable_sequence_parallelism configuration option across different vLLM versions. The changes in vllm_ascend/utils.py and CustomQwen3MoeDecoderLayer correctly implement version checking. However, a similar compatibility logic is missing in CustomQwen3MoeForCausalLM, which could lead to issues with newer vLLM versions. I have provided a suggestion to address this critical issue.

self.model.make_empty_intermediate_tensors)

self.enable_sequence_parallelism = vllm_config.compilation_config.pass_config.enable_sp
self.enable_sequence_parallelism = vllm_config.compilation_config.pass_config.enable_sequence_parallelism
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

This change appears to be incorrect. It replaces enable_sp with enable_sequence_parallelism without the necessary compatibility logic for different vLLM versions. This will likely cause a failure on vLLM versions newer than 0.12.0. To ensure compatibility, you should apply the same version-checking logic that is used in CustomQwen3MoeDecoderLayer.__init__ and vllm_ascend/utils.py.

Suggested change
self.enable_sequence_parallelism = vllm_config.compilation_config.pass_config.enable_sequence_parallelism
self.enable_sequence_parallelism = (
vllm_config.compilation_config.pass_config.enable_sequence_parallelism
if vllm_version_is("0.12.0") else vllm_config.compilation_config.pass_config.enable_sp
)

@wangxiyuan
Copy link
Copy Markdown
Collaborator

it's included in v0.12.0. https://github.com/vllm-project/vllm/tree/v0.12.0

I think you should update your local code?

@wangxiyuan
Copy link
Copy Markdown
Collaborator

git tag --delete v0.12.0

@MengqingCao
Copy link
Copy Markdown
Collaborator Author

it's included in v0.12.0. https://github.com/vllm-project/vllm/tree/v0.12.0

I think you should update your local code?

Yes, you're right, thx!

@MengqingCao MengqingCao closed this Dec 8, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 8, 2025

👋 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants