test: bound CPU vocoder reference threads (#8347)

Signed-off-by: andyluo7 <andy.luo@amd.com>
This commit is contained in:
andyluo7 authored and GitHub committed 2026-10-04 19:19:22 +13:00
1 parent 1c1b831f58
commit 3ab726c126
7 files changed
+160 -17

No files matched your search

@@ -10,6 +10,7 @@ from torch.nn.utils import parametrize
from vllm_omni.model_executor.models.cosyvoice3.code2wav_core import hifigan
pytestmark = [
pytest.mark.usefixtures("single_threaded_cpu"),
pytest.mark.core_model,
pytest.mark.filterwarnings("ignore:.*weight_norm.*:FutureWarning"),
]
@@ -10,6 +10,7 @@ from torch.nn.utils import parametrize
from vllm_omni.model_executor.models.cosyvoice3.code2wav_core import hifigan
pytestmark = [
pytest.mark.usefixtures("single_threaded_cpu"),
pytest.mark.core_model,
pytest.mark.cpu,
# The legacy weight_norm API warns on construction; the "legacy" params
@@ -31,9 +31,8 @@ from vllm_omni.model_executor.models.cosyvoice3.code2wav_core.hifigan import (
_wrapped_slice,
)
from vllm_omni.model_executor.models.cosyvoice3.cosyvoice3_code2wav import CosyVoice3Code2Wav
from vllm_omni.platforms import current_omni_platform
pytestmark = [pytest.mark.core_model, pytest.mark.cpu]
pytestmark = [pytest.mark.core_model, pytest.mark.cpu, pytest.mark.usefixtures("single_threaded_cpu")]
CHUNK_LEN = 24
TOTAL_MEL = 96
@@ -341,10 +340,6 @@ def test_incremental_hift_matches_reference_for_voiced_f0(config):
@pytest.mark.parametrize("config", CONFIGS)
@pytest.mark.parametrize("first_len,step_len", [(10, 6), (10, 3), (20, 3), (10, 1)])
@pytest.mark.skipif(
current_omni_platform.is_rocm(),
reason="exhaustive CPU reference matrix exceeds the AMD CI time budget",
)
def test_incremental_hift_matches_reference_for_voiced_f0_small_chunks(config, first_len, step_len):
"""Same as test_incremental_hift_matches_reference_for_voiced_f0, but with small,
sub-receptive-field chunk sizes (down to 1 mel frame) instead of the uniform