Skip to content
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

Improve efficiency of ragged batching scheduler #376

Closed
wants to merge 3 commits into from

Conversation

tohtana
Copy link
Contributor

@tohtana tohtana commented Jan 12, 2024

This PR includes the following optimization in the ragged batching scheduler:

  • Remove inefficient loop in TopP logits processor (3903024): The loop in Top P processor is inefficient when it runs on multiple requests. This PR replaces the loop with a batch API with indexing.
  • Copying is_done flag of requests to host memory as a batch (6786737): is_done is computed on cuda but implicitly copied to host every time it is evaluated as bool. This PR copies it to host at once and stores them as Python bool values.

@tohtana tohtana marked this pull request as ready for review January 12, 2024 19:40
@tohtana tohtana changed the title Remove inefficient loop in TopP logits processor Improve efficiency of ragged batching scheduler Jan 12, 2024
@tohtana
Copy link
Contributor Author

tohtana commented Jan 16, 2024

Closing because #377 is an improved version of this PR.

@tohtana tohtana closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant