Skip to content

Conversation

@liumain1122
Copy link

@liumain1122 liumain1122 commented Nov 25, 2025

vLLM version: v0.11.0
vLLM main: vllm-project/vllm

What this PR does / why we need it?

Does this PR introduce any user-facing change?

How was this patch tested?

vLLM version: v0.11.0
vLLM main: vllm-project/vllm
Signed-off-by: liumail202512 <[email protected]>
@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.

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 introduces significant performance improvements to the Eagle3 inference process by refactoring tensor operations from NumPy to native PyTorch. This change effectively reduces CPU-GPU data transfer overhead and leverages GPU acceleration, which is crucial for optimizing inference speed. The updated _prepare_inputs method now has a cleaner interface, directly accepting necessary tensor inputs, and a new helper function _prepare_eagle_input_sequential has been added for efficient token index generation. Overall, these changes align well with the goal of enhancing performance.

dtype=torch.int32,
device=cu_target_query_lens.device,
)
BLOCK_SIZE = 1024
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The BLOCK_SIZE is hardcoded to 1024. While this might be an optimal value for certain scenarios, hardcoding it can limit the flexibility and potential performance of the _prepare_eagle_input_sequential function across different hardware, model configurations, or varying batch sizes. Consider making this value configurable or dynamically determining it based on runtime parameters to ensure broader applicability and optimal performance.

Suggested change
BLOCK_SIZE = 1024
BLOCK_SIZE = 1024 # Consider making this configurable or dynamic

vLLM version: v0.11.0
vLLM main: vllm-project/vllm
Signed-off-by: liumail202512 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants