Repository navigation
[AMD] [CI] Fix tests for v0.28.0 #6830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
b3518eb
b6ec436
82aa7fc
767d497
c45eddd
5b6703a
48b6a1f
a92c746
f8d806d
5c0a765
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # SPDX-FileCopyrightText: Copyright contributors to the vLLM project | ||
|
|
||
| import pytest | ||
| import torch | ||
|
|
||
|
|
||
| @pytest.fixture(autouse=True) | ||
| def restore_torch_default_dtype(): | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to fix error from https://buildkite.com/vllm/vllm-omni-amd-ci/builds/11218/list?jid=01a0538e-b7f2-4d6c-8e4d-89d2dda0e999&tab=output snippet:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3 (informational, root cause): the dtype leak this guards against originates at |
||
| """Keep process-global dtype changes from leaking between diffusion tests.""" | ||
| default_dtype = torch.get_default_dtype() | ||
| try: | ||
| yield | ||
| finally: | ||
| torch.set_default_dtype(default_dtype) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -397,7 +397,7 @@ def create_model_config(self) -> OmniModelConfig: | |
| candidate = os.path.join(local_dir, tokenizer_subfolder) | ||
| if os.path.isdir(candidate): | ||
| self.tokenizer = candidate | ||
| logger.info("Downloaded tokenizer from %s/%s", model_path, subfolder) | ||
| logger.info("Downloaded tokenizer from %s/%s", model_path, tokenizer_subfolder) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CosyVoice3 TTS startup fixProblemThe following end-to-end tests reported that the server processes exited before becoming ready:
During CosyVoice3 startup, This raised FixThe log statement now uses - logger.info("Downloaded tokenizer from %s/%s", model_path, subfolder)
+ logger.info("Downloaded tokenizer from %s/%s", model_path, tokenizer_subfolder)This is deliberately scoped to the incorrect variable reference. It does not change model selection, download behavior, tokenizer paths, or error handling. Regression coverageA unit test exercises the remote CosyVoice3 tokenizer path with a successful mocked snapshot download. It verifies that:
This test would fail before the fix because evaluating the success log statement raised VerificationThe relevant checks pass after the change:
The server startup log now reports the resolved tokenizer location without the false failure warning: |
||
| except Exception as e: | ||
| logger.warning("Failed to download tokenizer subfolder: %s", e) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ROCm cross-attention test tolerance fix
Failure
tests/diffusion/attention/test_flash_attn.py::test_cross_attn_key_padding_vs_sdpa[40]failed on ROCm with:
Triage and root cause
The regression test compares BF16 output from two different implementations:
AITER's variable-length FlashAttention kernel and PyTorch SDPA. The test reaches
the intended cross-attention route: all 256 query rows are retained while the
key/value rows are unpadded to the per-batch valid lengths of 17 and 29.
The failure is numerical rather than a masking or routing defect. On ROCm, the
two kernels use different BF16 reduction implementations. A maximum absolute
difference of
0.015625is a BF16-sized rounding difference and can exceed afixed
0.01absolute bound for larger-magnitude output values. The oldertest_fa_vs_sdpatest in the same file already accounts for this known AITERversus ROCm SDPA behavior with
rtol=1e-2andatol=1.5e-2.Fix
The cross-attention regression now uses the same ROCm-specific
torch.testing.assert_closecomparison as the existing FA-versus-SDPA test:CUDA and XPU retain the original strict maximum- and mean-difference checks.
This keeps the relaxation limited to the backend with the known numerical
behavior and still checks every output element, rather than only increasing a
global maximum-difference threshold.