-
-
Couldn't load subscription status.
- Fork 10.9k
[v1] Cleanup the BlockTable in InputBatch #13977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Chen Zhang <zhangch99@outlook.com>
|
👋 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 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 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| if not block_ids: | ||
| return | ||
| num_blocks = len(block_ids) | ||
| start = self.num_blocks_per_row[row_idx] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with this. Does this always equal to len(req_state.block_ids) - len(req_data.new_block_ids) if not 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, and added some tests for the checking block_table is the same as req_state.block_ids
Signed-off-by: Chen Zhang <zhangch99@outlook.com>
Signed-off-by: Chen Zhang <zhangch99@outlook.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
Signed-off-by: Chen Zhang <zhangch99@outlook.com>
This pr cleans up the BlockTable class by:
max_model_lenwhich is not used in this classstartargument inappend_rowand get this value fromself.num_blocks_per_rowblock_idto the first argument ofappend_rowandadd_row.2 & 3 are preparations of hybrid memory allocator (#11382). For hybrid models, different layers will have different BlockTable instances, and I want to broadcast the operations on BlockTable to all these BlockTable instances with exact the same arguments except different
block_id, so I need (2) as thestartcan be different and (3) to support passing differentblock_idvalues.Split from #13296