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

[V1] Integrate Piecewise CUDA graphs #10058

Merged
merged 2 commits into from
Nov 6, 2024
Merged

[V1] Integrate Piecewise CUDA graphs #10058

merged 2 commits into from
Nov 6, 2024

Conversation

WoosukKwon
Copy link
Collaborator

@WoosukKwon WoosukKwon commented Nov 5, 2024

This PR integrates the piecewise CUDA graphs into the V1 model runner.

  • Set VLLM_TORCH_COMPILE_LEVEL=3 to enable the feature.
  • The compilation + capturing time takes at most ~17 secs.
  • Currently, piecewise CUDA graphs are not compatible with custom ops. Therefore, we rely on Torch Inductor to optimize the model.
  • Consequently, FP8 or other quantizations are not supported with piecewise CUDA graphs.

Benchmarks (benchmark_latency.py)

Model Version CUDA Graphs Time (s)
OPT-125M (fp16) V1 w/o Piecewise CUDA Graphs 0.41
V1 w/ Piecewise CUDA Graphs 0.21
V0 w/o CUDA Graphs 0.47
V0 w/ CUDA Graphs 0.21
Llama 3.1 8B (bf16) V1 w/o Piecewise CUDA Graphs 1.26
V1 w/ Piecewise CUDA Graphs 1.04
V0 w/o CUDA Graphs 1.10
V0 w/ CUDA Graphs 0.99

Copy link

github-actions bot commented Nov 5, 2024

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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 do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

Copy link

mergify bot commented Nov 5, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. @WoosukKwon please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Copy link

mergify bot commented Nov 6, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. @WoosukKwon please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@WoosukKwon WoosukKwon changed the title [WIP][V1] Integrate Piecewise CUDA graphs [V1] Integrate Piecewise CUDA graphs Nov 6, 2024
@WoosukKwon WoosukKwon marked this pull request as ready for review November 6, 2024 02:26
Signed-off-by: Woosuk Kwon <[email protected]>
Signed-off-by: Woosuk Kwon <[email protected]>
Copy link
Member

@youkaichao youkaichao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glad to see the integration working!

@WoosukKwon WoosukKwon merged commit 4089985 into main Nov 6, 2024
14 of 22 checks passed
@WoosukKwon WoosukKwon deleted the v1-piecewise branch November 6, 2024 06:16
flaviabeo added a commit to flaviabeo/vllm that referenced this pull request Nov 6, 2024
JC1DA pushed a commit to JC1DA/vllm that referenced this pull request Nov 11, 2024
sumitd2 pushed a commit to sumitd2/vllm that referenced this pull request Nov 14, 2024
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 2024
mfournioux pushed a commit to mfournioux/vllm that referenced this pull request Nov 20, 2024
Signed-off-by: Woosuk Kwon <[email protected]>
Signed-off-by: Maxime Fournioux <[email protected]>
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.

2 participants