-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Remove overlap thread #11210
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
Remove overlap thread #11210
Conversation
Summary of ChangesHello @hnyls2002, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This Work In Progress pull request aims to streamline and refactor the system's overlap scheduling. It transitions the underlying mechanism to utilize explicit CUDA streams and events for asynchronous operations, enhancing control and potentially performance. The changes also involve centralizing related logic for sampling information and simplifying worker management, all as a preparatory step for merging a larger feature (#9334). Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request refactors the overlap scheduling mechanism by removing the separate overlap thread and integrating its logic directly into the Scheduler. The changes involve using CUDA streams and events for synchronization, which simplifies the design. My review focuses on code correctness and cleanup opportunities. I've identified some dead code, a typo, and several FIXME comments that should be addressed. Overall, this is a good step towards simplifying the scheduling logic.
a921488 to
5083846
Compare
30944bf to
1c1973b
Compare
Co-authored-by: Lianmin Zheng <[email protected]> Co-authored-by: Hanming Lu <[email protected]>
|
It seems like after this PR got merged, I’ve run into the following error quite a few times—it happens pretty frequently, but I haven’t figured out a consistent way to reproduce it yet. Strangely, when I set CUDA_LAUNCH_BLOCKING=1, the issue seems to go away. |
A step to merge #9334 into main.
This PR:
ModelWorkerBatch(maybe removed or replaced with cuda stream recording).ForwardBatchOutputwithGenerationBatchResultWhat to do next (in the following cleanup PR)
tp_worker_overlap_thread.py(Remove sampling info events and overlap thread file #11300)sampling_info_done(Remove sampling info events and overlap thread file #11300)token_idsin batch to represent future indices. Introduce standalone future indices. (Introduce future indices #11301)