Skip to content

Conversation

@LucasWilkinson
Copy link
Collaborator

@LucasWilkinson LucasWilkinson commented Dec 9, 2025

Summary

Fixes test_dynamic_per_tensor_fp8_quant that was broken by #30257. (CI failure: https://buildkite.com/organizations/vllm/pipelines/ci/builds/42664/jobs/019b03c9-8e5a-4fb8-baec-7ba031141cbf/log)

Issue

#30257 changed ops.scaled_fp8_quant to return scale with shape [1] instead of [1, 1]. However, the test's reference function ref_dynamic_per_tensor_fp8_quant was not updated to match, causing all test_dynamic_per_tensor_fp8_quant tests to fail with:

AssertionError: The values for attribute 'shape' do not match: torch.Size([1, 1]) != torch.Size([1]).

Fix

Updated ref_dynamic_per_tensor_fp8_quant in tests/kernels/quant_utils.py to return scale with shape [1] instead of [1, 1], matching the new behavior of the ops implementation.

Testing

pytest tests/kernels/quantization/test_fp8_quant.py -v
# 109 passed

Fixes test_dynamic_per_tensor_fp8_quant that was broken by vllm-project#30257.

Commit 03416ea changed ops.scaled_fp8_quant to return scale with
shape [1] instead of [1, 1], but the test reference function was not
updated to match.

Updated ref_dynamic_per_tensor_fp8_quant to return scale with shape [1]
to match the new ops implementation behavior.

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@LucasWilkinson LucasWilkinson added the ready ONLY add when PR is ready to merge/full CI is needed label Dec 9, 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 addresses a test failure in test_dynamic_per_tensor_fp8_quant by correcting the shape of the returned scale in the reference implementation ref_dynamic_per_tensor_fp8_quant. The change modifies ref_scale.view((1, 1)) to ref_scale.view(1), which aligns the test's reference function with the updated behavior of ops.scaled_fp8_quant that now returns a scale of shape [1]. This is a correct and necessary fix to ensure the CI/test suite passes. The change is minimal and directly targets the described issue.

@robertgshaw2-redhat robertgshaw2-redhat merged commit b37bf51 into vllm-project:main Dec 9, 2025
18 of 19 checks passed
shaharmor98 pushed a commit to shaharmor98/smor-vllm that referenced this pull request Dec 11, 2025
TheCodeWrangler pushed a commit to TheCodeWrangler/vllm that referenced this pull request Dec 12, 2025
…roject#30352)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Signed-off-by: Nathan Price <nathan@abridge.com>
TheCodeWrangler pushed a commit to TheCodeWrangler/vllm that referenced this pull request Dec 12, 2025
…roject#30352)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Signed-off-by: Nathan Price <nathan@abridge.com>

Signed-off-by: Nathan Price <nathan@abridge.com>
TheCodeWrangler pushed a commit to TheCodeWrangler/vllm that referenced this pull request Dec 12, 2025
…roject#30352)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Signed-off-by: Nathan Price <nathan@abridge.com>
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.

2 participants