-
Notifications
You must be signed in to change notification settings - Fork 33
[TPU Offload]Manage staging buffer in HBM #1069
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
DescriptionStart with a short description of what the PR does and how this is a change from The rest of the description includes relevant details and context, examples:
If the change fixes a bug or a Github issue, please include a link, e.g.,: TestsPlease describe how you tested this change, and include any instructions and/or ChecklistBefore submitting this PR, please make sure:
|
Signed-off-by: Juncheng Gu <[email protected]>
6d987d7 to
c25e534
Compare
|
aligned with the high level appraoch on the block tracking, reporting and staging buffer budgeting. let's also add unit tests for added confidence in the PR |
Signed-off-by: Juncheng Gu <[email protected]>
Signed-off-by: Juncheng Gu <[email protected]>
Signed-off-by: Juncheng Gu <[email protected]>
saikat-royc
left a comment
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.
nice work on the unit tests!
Signed-off-by: Juncheng Gu <[email protected]>
|
Thanks for the reviews! |
Description
Add a staging buffer manager to book-keep the # of used staging blocks (page / chunk) for swap- in / out. This should be helpful in mitigating the OOM issue when kv cache offloading is handling very large of save / load blocks.
TPU_OFFLOAD_STAGING_BUFFER_TOKENS=8192. we will find a way to specify the buffer size in GB instead of in tokens.Tests
pytest -sv tests/distrbuted/cpu_offloading_scheduler_test.pyChecklist
Before submitting this PR, please make sure: