Skip to content

[CI/Build] Conditionally register cutlass_fp4_group_mm to fix building on Hopper#26138

Merged
vllm-bot merged 1 commit intovllm-project:mainfrom
neuralmagic:fix-hopper-build
Oct 3, 2025
Merged

[CI/Build] Conditionally register cutlass_fp4_group_mm to fix building on Hopper#26138
vllm-bot merged 1 commit intovllm-project:mainfrom
neuralmagic:fix-hopper-build

Conversation

@mgoin
Copy link
Member

@mgoin mgoin commented Oct 2, 2025

Purpose

cutlass_fp4_group_mm was unconditionally registered in torch_bindings.cpp even though its implementation is only compiled when ENABLE_NVFP4_SM100 is defined, causing undefined symbol errors on Hopper.
This fix moves the ops.impl registration to be conditionally compiled within nvfp4_blockwise_moe_kernel.cu using TORCH_LIBRARY_IMPL_EXPAND, matching the pattern used by other conditionally-compiled operations like cutlass_blockwise_scaled_grouped_mm.

Test Plan

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.

Signed-off-by: mgoin <mgoin64@gmail.com>
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 correctly resolves a build issue on Hopper systems by conditionally registering the cutlass_fp4_group_mm operator. Moving the implementation registration into the same compilation unit (nvfp4_blockwise_moe_kernel.cu) as the function definition ensures that the operator is only registered when it is actually compiled, thus preventing linker errors. The approach is consistent with how other conditionally compiled operators are handled in the codebase. The changes are clean, targeted, and effectively address the problem.

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 2, 2025
@ProExpertProg ProExpertProg enabled auto-merge (squash) October 3, 2025 01:40
@vllm-bot vllm-bot merged commit 5d5146e into vllm-project:main Oct 3, 2025
86 of 88 checks passed
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
…g on Hopper (#26138)

Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
tomeras91 pushed a commit to tomeras91/vllm that referenced this pull request Oct 6, 2025
…g on Hopper (vllm-project#26138)

Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
karan pushed a commit to karan/vllm that referenced this pull request Oct 6, 2025
…g on Hopper (vllm-project#26138)

Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: Karan Goel <3261985+karan@users.noreply.github.com>
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
alhridoy pushed a commit to alhridoy/vllm that referenced this pull request Oct 24, 2025
rtourgeman pushed a commit to rtourgeman/vllm that referenced this pull request Nov 10, 2025
devpatelio pushed a commit to SumanthRH/vllm that referenced this pull request Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants