Skip to content

Conversation

NickLucche
Copy link
Collaborator

@NickLucche NickLucche commented Apr 14, 2025

Currently if passing a non power of 2 max-num-batched-tokens will trigger the assert

assert index < len(paddings)

This is because we're not padding for next bigger multiple of 2 power.
Eg.

# main
max-num-batched-tokens = 586
->padding [16, 32, 64, 128, 256, 512]

# with fix
max-num-batched-tokens = 586
->padding [16, 32, 64, 128, 256, 512, 1024]

Signed-off-by: NickLucche <[email protected]>
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@mergify mergify bot added v1 tpu Related to Google TPUs labels Apr 14, 2025
@NickLucche NickLucche changed the title [TPU][V1] Fix exponential padding when max-num-batched tokens is not a power of 2 [TPU][V1] Fix exponential padding when max-num-batched-tokens is not a power of 2 Apr 14, 2025
Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

Thanks!

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 14, 2025
@mgoin mgoin enabled auto-merge (squash) April 14, 2025 16:39
@mgoin mgoin merged commit b3f2fdd into vllm-project:main Apr 14, 2025
61 checks passed
yangw-dev pushed a commit to yangw-dev/vllm that referenced this pull request Apr 21, 2025
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Apr 29, 2025
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Apr 29, 2025
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed tpu Related to Google TPUs v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants