Skip to content

Conversation

@yaochengji
Copy link
Collaborator

@yaochengji yaochengji commented Jul 15, 2025

Purpose

Fix TPU CI test.

Test Plan

pytest -s -v tests/v1/tpu/test_basic.py

Test Result

Passed.

(Optional) Documentation Update

Signed-off-by: Chengji Yao <chengjiyao@google.com>
@github-actions
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.

🚀

@yaochengji
Copy link
Collaborator Author

@bythew3i @tengyifei could you take a look?

@mergify mergify bot added v1 tpu Related to Google TPUs labels Jul 15, 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 fixes a TPU CI test by adjusting the KV cache update logic. A critical issue was identified where the application could crash with a ZeroDivisionError when running attention-free models on TPU, due to page_size_bytes being zero. A fix has been suggested to handle this edge case.

Signed-off-by: Chengji Yao <chengjiyao@google.com>
@yaochengji yaochengji added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 15, 2025
Signed-off-by: Chengji Yao <chengjiyao@google.com>
@yaochengji yaochengji force-pushed the chengji/fix-ci-test branch from 1c81513 to 4de8313 Compare July 15, 2025 22:54
@mgoin mgoin enabled auto-merge (squash) July 16, 2025 00:46
@vanbasten23
Copy link
Collaborator

Could you summarize what problem this PR is addressing?


kv_cache_dtype_bits = dtype_bits(kv_cache_dtype)
return (block_size * num_combined_kv_heads * padded_head_size *
kv_cache_dtype_bits // 8)
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is 8 in the kv_cache_dtype_bits // 8?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

1 bytes = 8 bits

vmem_limit = 32 * 1024 * 1024
# The default vmem_limit_bytes of a pallas kernel is 32MB. Here we
# calculate num_slices_per_block based on 16MB in case any register spills.
vmem_limit = 16 * 1024 * 1024
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder why we reduce the vmem_limit from 32mb to 16mb?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As noted in the comment, there might be register spills.

@mgoin mgoin merged commit 85431bd into vllm-project:main Jul 16, 2025
68 checks passed
@yaochengji
Copy link
Collaborator Author

yaochengji commented Jul 16, 2025

Could you summarize what problem this PR is addressing?

@vanbasten23 It is used fix the potential VMEM OOM due to incorrect vmem estimation.

x22x22 pushed a commit to x22x22/vllm that referenced this pull request Aug 5, 2025
…ect#21007)

Signed-off-by: Chengji Yao <chengjiyao@google.com>
Signed-off-by: x22x22 <wadeking@qq.com>
Pradyun92 pushed a commit to Pradyun92/vllm that referenced this pull request Aug 6, 2025
npanpaliya pushed a commit to odh-on-pz/vllm-upstream that referenced this pull request Aug 6, 2025
jinzhen-lin pushed a commit to jinzhen-lin/vllm that referenced this pull request Aug 9, 2025
…ect#21007)

Signed-off-by: Chengji Yao <chengjiyao@google.com>
Signed-off-by: Jinzhen Lin <linjinzhen@hotmail.com>
paulpak58 pushed a commit to paulpak58/vllm that referenced this pull request Aug 13, 2025
…ect#21007)

Signed-off-by: Chengji Yao <chengjiyao@google.com>
Signed-off-by: Paul Pak <paulpak58@gmail.com>
diegocastanibm pushed a commit to diegocastanibm/vllm that referenced this pull request Aug 15, 2025
…ect#21007)

Signed-off-by: Chengji Yao <chengjiyao@google.com>
Signed-off-by: Diego-Castan <diego.castan@ibm.com>
ca1207 pushed a commit to MotifTechnologies/vllm that referenced this pull request Aug 22, 2025
…ect#21007)

Signed-off-by: Chengji Yao <chengjiyao@google.com>
Signed-off-by: taehyun <taehyun.kim@motiftech.io>
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 27, 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.

4 participants