Skip to content

fix: pass weight shape instead of tensor to should_use_deepgemm_for_fp8_linear - #2574

Merged
terrykong merged 1 commit into
mainfrom
fix/deepgemm-fp8-weight-shape
May 27, 2026
Merged

fix: pass weight shape instead of tensor to should_use_deepgemm_for_fp8_linear#2574
terrykong merged 1 commit into
mainfrom
fix/deepgemm-fp8-weight-shape

Conversation

@kajalj22

@kajalj22 kajalj22 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • should_use_deepgemm_for_fp8_linear in vLLM 0.20.0 expects weight_shape: tuple[int, int], but NeMo-RL was passing layer.weight (the full FP8 tensor)
  • This caused NotImplementedError: "remainder_cuda" not implemented for 'Float8_e4m3fn' during weight loading when DeepGEMM is enabled
  • Fix: pass layer.weight.shape instead of layer.weight

Root cause

The vLLM 0.17→0.20 upgrade (#2384) changed the should_use_deepgemm_for_fp8_linear API from accepting a tensor to accepting a shape tuple. The call site in maybe_post_process_fp8_weight_block was not updated.

🤖 Generated with Claude Code

…fp8_linear`

vLLM 0.20.0 changed `should_use_deepgemm_for_fp8_linear` to expect a
`tuple[int, int]` shape rather than the weight tensor. Passing the FP8
tensor caused `weight_shape[0] % N_MULTIPLE` to fail with
`NotImplementedError: "remainder_cuda" not implemented for 'Float8_e4m3fn'`
during weight loading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22
kajalj22 requested a review from a team as a code owner May 26, 2026 17:52
@copy-pr-bot

copy-pr-bot Bot commented May 26, 2026

Copy link
Copy Markdown

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 77eafab

@kajalj22 kajalj22 added the CI:L1 Run doctests, unit tests, and functional tests label May 26, 2026
@guyueh1

guyueh1 commented May 27, 2026

Copy link
Copy Markdown
Contributor

The relevant vLLM API is changed in vllm-project/vllm@2e9034c#diff-9a1a1730a1fc1868db95c85ee80170d8ab45f4db59d372a81225c6a6268cfc27 so this is reasonable fix. LGTM.

@terrykong
terrykong merged commit a1bf1ad into main May 27, 2026
55 of 56 checks passed
@terrykong
terrykong deleted the fix/deepgemm-fp8-weight-shape branch May 27, 2026 20:42
vigneshwaran pushed a commit to vigneshwaran/RL that referenced this pull request May 28, 2026
…p8_linear (NVIDIA-NeMo#2574)

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants