Skip to content

Conversation

@mgoin
Copy link
Member

@mgoin mgoin commented Oct 8, 2025

Purpose

It seems that FlashInfer does not require nvcc to installed from source anymore since flashinfer-python>=0.2.9, so we can move it to be a default dependency!

Obviously to have it JIT compile kernels it needs to have nvcc available, so we will currently add that condition to has_flashinfer(). This is more conservative than it needs to be, as if we have an AOT compiled wheel installed there is likely no need for nvcc, but we can improve this later.

Also with flashinfer-python==0.4.0, we can now move to using flashinfer-cubin and flashinfer-jit-cache wheels instead of pre-compiling ourselves in the docker!

Test Plan

Test Result

I used a uv python image to simulate installing flashinfer-python without any cuda toolkit available

docker run -it --rm astral/uv:bookworm-slim bash
root@bbbb3b887d99:/# uv venv --python 3.12
root@bbbb3b887d99:/# source .venv/bin/activate
(.venv) root@bbbb3b887d99:/# uv pip install flashinfer-python==0.2.8
...
      FileNotFoundError: [Errno 2] No such file or directory: 'nvcc'

(.venv) root@bbbb3b887d99:/# uv pip install flashinfer-python==0.2.9
Installed 41 packages in 451ms

(.venv) root@bbbb3b887d99:/# uv pip install flashinfer-python==0.3.1
Installed 5 packages in 103ms

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: mgoin <mgoin64@gmail.com>
@mergify mergify bot added the ci/build label Oct 8, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 aims to make FlashInfer a default CUDA dependency, which is a great step for user experience. My main concern is with the change in vllm/utils/flashinfer.py, which could negatively impact users in environments without the full CUDA toolkit. Please see my detailed comment.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Signed-off-by: mgoin <mgoin64@gmail.com>
@bbartels
Copy link
Contributor

bbartels commented Oct 8, 2025

Do we still need the flashinfer compilation at all? Flashinfer as of today releases a nightly wheel with full precompiled cubins.

@mgoin
Copy link
Member Author

mgoin commented Oct 8, 2025

@bbartels We will start using the precompiled wheels (flashinfer-jit-cache and flashinfer-cubins) in the upcoming flashinfer 0.4.0 release. However I doubt we will include them by default since they don't live on pypi and are ~1 GB, which is a sizable increase for all users

Signed-off-by: mgoin <mgoin64@gmail.com>
@bbartels
Copy link
Contributor

bbartels commented Oct 8, 2025

That's fair, might not be a good idea to require them for the vllm wheel. But I could see it be worth including it by default in the Dockerfile, since that would unblock moving back to the substantially smaller nvidia base image.
(Unless I am mistaken)

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 9, 2025
@mergify
Copy link

mergify bot commented Oct 9, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @mgoin.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Oct 9, 2025
mgoin added 2 commits October 9, 2025 10:42
Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: mgoin <mgoin64@gmail.com>
Copy link
Member

@yewentao256 yewentao256 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the work!

@yewentao256 yewentao256 enabled auto-merge (squash) October 9, 2025 20:54
@vllm-bot vllm-bot merged commit c9d33c6 into vllm-project:main Oct 9, 2025
8 of 13 checks passed
@mgoin mgoin deleted the flashinfer-by-default branch October 9, 2025 21:10
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Dhruvilbhatt pushed a commit to Dhruvilbhatt/vllm that referenced this pull request Oct 14, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Signed-off-by: Dhruvil Bhatt <bhattdbh@amazon.com>
@jeejeelee jeejeelee mentioned this pull request Oct 16, 2025
5 tasks
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
alhridoy pushed a commit to alhridoy/vllm that referenced this pull request Oct 24, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Signed-off-by: 0xrushi <6279035+0xrushi@users.noreply.github.com>
mxz297 added a commit to mxz297/vllm that referenced this pull request Nov 3, 2025
Summary: vllm-project#26443 adds checking of availability of nvcc as a condition to enable flashinfer moe. On devgpus, we may have nvcc so there is no issue. But in tw jobs, there is no nvcc, then flashinfer moe is disabled.

Differential Revision: D86104899
larroy pushed a commit to larroy/vllm that referenced this pull request Nov 6, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
mxz297 added a commit to mxz297/vllm that referenced this pull request Nov 7, 2025
Summary:

vllm-project#26443 adds checking of availability of nvcc as a condition to enable flashinfer moe. On devgpus, we may have nvcc so there is no issue. But in tw jobs, there is no nvcc, then flashinfer moe is disabled.

Differential Revision: D86104899
mxz297 added a commit to mxz297/vllm that referenced this pull request Nov 7, 2025
…-project#27990)

Summary:

vllm-project#26443 adds checking of availability of nvcc as a condition to enable flashinfer moe. On devgpus, we may have nvcc so there is no issue. But in tw jobs, there is no nvcc, then flashinfer moe is disabled.

Differential Revision: D86104899

Signed-off-by: Xiaozhu <mxz297@gmail.com>
rtourgeman pushed a commit to rtourgeman/vllm that referenced this pull request Nov 10, 2025
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants