-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Release KV cache memory occupation when not needed #2588
Conversation
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.
The design makes sense. The only downside is that it is not compatible with cuda graph. Does you have any ideas to make it compatible with cuda graph? Can we try to hack into the pytorch memory allocator and reuse buffer or fix the cuda pointers?
@merrymercy Thank you! I posted in #2542 (comment) |
I will temporarily close this since #2542 (comment) seems more promising :) |
Motivation
This PR depends on #2586, thus there are much more code in the diff panel than its actual content.
Please see #2542
Modifications
Checklist