Skip to content

[Bugfix] Fix build issue around cutlass_fp4_group_mm on platforms without nvfp4#26061

Closed
StrongerXi wants to merge 1 commit intovllm-project:mainfrom
StrongerXi:main
Closed

[Bugfix] Fix build issue around cutlass_fp4_group_mm on platforms without nvfp4#26061
StrongerXi wants to merge 1 commit intovllm-project:mainfrom
StrongerXi:main

Conversation

@StrongerXi
Copy link

@StrongerXi StrongerXi commented Oct 2, 2025

Purpose

Fixes the undefined symbol issue (#23925 (comment)) by keeping the function definition of cutlass_fp4_group_mm even on non-nvfp4-supported platforms in csrc/quantization/fp4/nvfp4_blockwise_moe_entry.cu.

Similar to #23727.

Test Plan

Existing tests and build pass on platform without nvfp4 support (H100 in my case).

Test Result


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.

@github-actions
Copy link

github-actions bot commented Oct 2, 2025

👋 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.

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 ask your reviewers to trigger select CI tests on top of fastcheck CI.

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.

🚀

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 fix a build issue for cutlass_fp4_group_mm on platforms without nvfp4 support by introducing a dispatch file. The approach is correct, but there is a critical error in the implementation of the new dispatch function that will cause a compilation failure. I've provided a fix for this issue.

@@ -367,7 +367,7 @@ constexpr auto SF_DTYPE = at::ScalarType::Float8_e4m3fn;
CHECK_CONTIGUOUS(x, m); \
CHECK_TYPE(x, st, m)

void cutlass_fp4_group_mm(
Copy link
Author

Choose a reason for hiding this comment

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

This file isn't always included in the build, I think that's why I ran into the undefined symbol error

vllm/CMakeLists.txt

Lines 600 to 606 in 1726e93

if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.8 AND FP4_ARCHS)
set(SRCS
"csrc/quantization/fp4/nvfp4_quant_kernels.cu"
"csrc/quantization/fp4/activation_nvfp4_quant_fusion_kernels.cu"
"csrc/quantization/fp4/nvfp4_experts_quant.cu"
"csrc/quantization/fp4/nvfp4_scaled_mm_kernels.cu"
"csrc/quantization/fp4/nvfp4_blockwise_moe_kernel.cu")

…ithout nvfp4

Fixes the undefined symbol issue
(vllm-project#23925 (comment))
by keeping the function definition of `cutlass_fp4_group_mm` even on
non-nvfp4-supported platforms in `csrc/quantization/fp4/nvfp4_blockwise_moe_entry.cu`.

Similar to vllm-project#23727.
@ProExpertProg
Copy link
Collaborator

This should be covered by #26077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants