Skip to content

[Bugfix] Gate FlashInfer FP4 MoE on kernel availability - #48695

Closed
dumko2001 wants to merge 3 commits into
vllm-project:mainfrom
dumko2001:flashinfer-fp4-capability-gate
Closed

dumko2001 wants to merge 3 commits into
vllm-project:mainfrom
dumko2001:flashinfer-fp4-capability-gate

Conversation

@dumko2001

@dumko2001 dumko2001 commented Jul 15, 2026

Copy link
Copy Markdown

Purpose

FlashInfer CUTLASS MoE selection accepted FP4 schemes when the installed build
had no FP4 support. On the reported H100 setup, nvcc was absent and no
flashinfer_jit_cache package was installed. The selector could then spend
minutes compiling before failing. Check FP4 capability before accepting the
FP4 schemes.

Fixes #48541

Related work: I searched open and closed PR references for #48541 and found no
overlapping PR. AI assistance was used; I reviewed the changed code and the
GPU results.

Test Plan

uv tool run ruff check repro/gpu_validate_flashinfer_fp4.py
uv run --no-project python -m py_compile \
  repro/gpu_validate_flashinfer_fp4.py
python repro/gpu_validate_flashinfer_fp4.py

The GPU validation ran on an H100 SXM with CUDA 13.0 and no nvcc. The
validation checked the stock wheel, then overlaid:

vllm/utils/flashinfer.py
vllm/model_executor/layers/fused_moe/experts/flashinfer_cutlass_moe.py

Added CPU unit tests for precompiled cubins, missing nvcc, and supported or
older nvcc versions.

Test Result

Unpatched H100 result:

NVCC: ABSENT
NVFP4_SELECTION_PREDICATE: True

This reproduced the bad selection for
_supports_quant_scheme(kMxfp4Static, None). Patched result:

FP4_CAPABILITY: False
NVFP4_SELECTION_PREDICATE: False
PASS: patched FlashInfer selection rejects unavailable NVFP4

The direct NVFP4 predicate stayed false in both variants because that branch
requires compute capability 100. No long JIT failure was started.


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.

Check FP4 kernel availability before selecting FlashInfer CUTLASS MoE.

Fixes vllm-project#48541

Co-authored-by: Devin AI <noreply@devin.ai>

Signed-off-by: Sidharth Rajmohan <dumko.raj@gmail.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

PRs do not trigger a full CI run by default. 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 either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

@mergify mergify Bot added nvidia bug Something isn't working labels Jul 15, 2026
@devin-ai-integration
devin-ai-integration Bot force-pushed the flashinfer-fp4-capability-gate branch from f086b5e to a76db4d Compare July 15, 2026 06:26

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

Copy link
Copy Markdown

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.

Reviewed commit: f086b5eabf

ℹ️ 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 "@codex address that feedback".

Comment thread vllm/utils/flashinfer.py
Signed-off-by: Sidharth Rajmohan <dumko.raj@gmail.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Signed-off-by: Sidharth Rajmohan <dumko.raj@gmail.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dumko2001

Copy link
Copy Markdown
Author

Closing after re-auditing this against the producer rather than maintaining a vLLM-side package/toolchain heuristic. The current branch is incorrect because flashinfer-cubin does not provide the CUTLASS fused_moe JIT module, so its early return still accepts the reported broken installation. More importantly, FlashInfer merged flashinfer-ai/flashinfer#3738, which removes the CUDA 12.8 dependency for the Hopper MXFP4 path by using CUTLASS subbyte FP4 types. That is the durable fix for the H100 report; vLLM should consume it through a future FlashInfer pin instead of probing private JIT-cache/package details. flashinfer-ai/flashinfer#3951 can remain open for a public capability API and clearer diagnostics. #48541 should remain open until vLLM pins a release containing #3738 and validates the original repro.

@dumko2001 dumko2001 closed this Jul 22, 2026
@github-project-automation github-project-automation Bot moved this to Done in NVIDIA Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working nvidia

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: FlashInfer CUTLASS MoE selected on fp4-less builds (CUDA toolkit < 12.8); gpt-oss dies at engine start

1 participant