From 324a3d2bd8b5fc3f38c6d2f2cc243f747800ba28 Mon Sep 17 00:00:00 2001 From: "Li, Jiang" Date: Thu, 16 Apr 2026 21:50:36 +0800 Subject: [PATCH] [CI/Build] Improve stability of CPU tests (#39966) Signed-off-by: jiang1.li --- .buildkite/hardware_tests/cpu.yaml | 4 ++-- tests/models/language/generation/test_common.py | 8 ++++---- tests/models/language/generation/test_granite.py | 1 + vllm/platforms/cpu.py | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.buildkite/hardware_tests/cpu.yaml b/.buildkite/hardware_tests/cpu.yaml index e466e2a5244..9b104444378 100644 --- a/.buildkite/hardware_tests/cpu.yaml +++ b/.buildkite/hardware_tests/cpu.yaml @@ -46,7 +46,7 @@ steps: - tests/models/language/pooling/ commands: - | - bash .buildkite/scripts/hardware_ci/run-cpu-test.sh 30m " + bash .buildkite/scripts/hardware_ci/run-cpu-test.sh 40m " pytest -x -v -s tests/models/language/generation -m cpu_model pytest -x -v -s tests/models/language/pooling -m cpu_model" @@ -99,7 +99,7 @@ steps: - | bash .buildkite/scripts/hardware_ci/run-cpu-test.sh 45m " pytest -x -v -s tests/models/multimodal/generation --ignore=tests/models/multimodal/generation/test_pixtral.py -m cpu_model --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --shard-id=$$BUILDKITE_PARALLEL_JOB" - parallelism: 2 + parallelism: 3 - label: "Arm CPU Test" depends_on: [] diff --git a/tests/models/language/generation/test_common.py b/tests/models/language/generation/test_common.py index b276f37a2a3..ebf847b706c 100644 --- a/tests/models/language/generation/test_common.py +++ b/tests/models/language/generation/test_common.py @@ -100,7 +100,7 @@ AITER_MODEL_LIST = [ pytest.param("bigcode/starcoder2-3b"), # starcoder2 pytest.param( "TitanML/tiny-mixtral", # mixtral - marks=[pytest.mark.core_model, pytest.mark.cpu_model], + marks=[pytest.mark.core_model], ), pytest.param("swiss-ai/Apertus-8B-Instruct-2509"), # apertus pytest.param( @@ -143,9 +143,9 @@ def test_models( # in parts of the operators pytest.skip(f"Skipping '{model}' model test with AITER kernel.") - if current_platform.is_cpu() and model == "TitanML/tiny-mixtral": - # This untrained model is sensitive to the rounding error - # Fuse ops to reduce bfloat16 rounding + if current_platform.is_cpu() and model in ("openai-community/gpt2",): + # These models are sensitive to the rounding error + # Fuse ops to reduce rounding monkeypatch.setenv("VLLM_CPU_CI_ENV", "0") with hf_runner(model) as hf_model: diff --git a/tests/models/language/generation/test_granite.py b/tests/models/language/generation/test_granite.py index e569e75ff3a..c0498b2f7de 100644 --- a/tests/models/language/generation/test_granite.py +++ b/tests/models/language/generation/test_granite.py @@ -15,6 +15,7 @@ MODELS = [ @pytest.mark.parametrize("dtype", ["bfloat16"]) @pytest.mark.parametrize("max_tokens", [64]) @pytest.mark.parametrize("num_logprobs", [5]) +@pytest.mark.cpu_model def test_models( hf_runner, vllm_runner, diff --git a/vllm/platforms/cpu.py b/vllm/platforms/cpu.py index f319dbc497a..86f07b1032e 100644 --- a/vllm/platforms/cpu.py +++ b/vllm/platforms/cpu.py @@ -242,6 +242,7 @@ class CpuPlatform(Platform): "cpp.dynamic_threads": True, } ) + compilation_config.ir_enable_torch_wrap = False if vllm_config.lora_config is not None: compilation_config.mode = CompilationMode.NONE