Skip to content

[ROCm][Test] Use platform FP8 dtype in ModelOpt FP8_PB_WO test - #53268

Merged
AndreasKaratzas merged 1 commit into
vllm-project:mainfrom
djramic:fix-modelopt-fp8-pb-w-dtype
Aug 21, 2026
Merged

[ROCm][Test] Use platform FP8 dtype in ModelOpt FP8_PB_WO test#53268
AndreasKaratzas merged 1 commit into
vllm-project:mainfrom
djramic:fix-modelopt-fp8-pb-w-dtype

Conversation

@djramic

@djramic djramic commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Purpose

quantization/test_modelopt.py::test_modelopt_fp8_pb_wo_checkpoint_setup failed on MI300. The test loads a ModelOpt FP8_PB_WO checkpoint and checks that the linear layer weights have the expected FP8 dtype, but it hardcoded torch.float8_e4m3fn.

On ROCm, FP8 weights are stored as e4m3fnuz. After #53132, the ModelOpt FP8_PB_WO weight post-processing path started running on load and converted the weights to the platform FP8 dtype. The test still expected the old hardcoded dtype, so it failed with: assert torch.float8_e4m3fnuz == torch.float8_e4m3fn

This change updates the test to resolve the expected dtype via current_platform.fp8_dtype() and compare the loaded weight dtypes against the platform FP8 dtype instead of hardcoded torch.float8_e4m3fn

Test Plan

pytest tests/quantization/test_modelopt.py on MI300X.

Test Result

Before:
1 failed, 19 passed, 4 skipped
After:
20 passed, 4 skipped

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.

BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)

Signed-off-by: Djordje Ramic <djoramic@amd.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.

@mergify mergify Bot added the rocm Related to AMD ROCm label Aug 21, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Aug 21, 2026
@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #85032 for commit 6c496f61b13a.

@AndreasKaratzas
AndreasKaratzas merged commit f15ea66 into vllm-project:main Aug 21, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rocm Related to AMD ROCm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants