[ROCm][Test] Use platform FP8 dtype in ModelOpt FP8_PB_WO test - #53268
Merged
AndreasKaratzas merged 1 commit intoAug 21, 2026
Merged
Conversation
Signed-off-by: Djordje Ramic <djoramic@amd.com>
djramic
requested review from
AndreasKaratzas,
mgoin,
pavanimajety,
robertgshaw2-redhat,
yewentao256 and
zyongye
as code owners
August 21, 2026 12:45
fxmarty-amd
approved these changes
Aug 21, 2026
Member
|
/ci run |
|
✅ Triggered Buildkite CI #85032 for commit |
AndreasKaratzas
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
quantization/test_modelopt.py::test_modelopt_fp8_pb_wo_checkpoint_setupfailed 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 hardcodedtorch.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_e4m3fnThis 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_e4m3fnTest Plan
pytest tests/quantization/test_modelopt.pyon MI300X.Test Result
Before:
1 failed, 19 passed, 4 skipped
After:
20 passed, 4 skipped
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor 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)