[ROCm][CI] Set "highest" matmul precision for reference hf_runner in test_bert_for_masked_lm - #48784
Merged
Merged
Conversation
Signed-off-by: Micah Williamson <micah.williamson@amd.com>
noooop
approved these changes
Jul 16, 2026
noooop
enabled auto-merge (squash)
July 16, 2026 02:19
Contributor
|
Hi @micah-wil, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, |
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.
#48463 added
test_bert_for_masked_lmwhich fails on ROCm due to subtle accuracy differences:https://buildkite.com/vllm/ci/builds/77892/canvas?jid=019f5db5-b9e5-4728-86b6-2f2b8ef7e7c3&tab=output
This is because the vLLM runner uses matmul precisoin "highest" by default:
vllm/vllm/envs.py
Lines 597 to 602 in ecf4aa5
vllm/vllm/v1/worker/gpu_worker.py
Lines 147 to 149 in ecf4aa5
However, for this test group, we explicitly set
torch.set_float32_matmul_precision("high")on ROCm to workaround a separate issue (see #31820).vllm/tests/models/language/pooling/conftest.py
Line 23 in ecf4aa5
This gets picked up by the reference
hf_runner, so the accuracy of the reference is less stable than on CUDA which does not settorch.set_float32_matmul_precision("high").