[CI][CPU] Add Qwen2-VL multimodal tests for CPU backend and fix incompatibilities (#48072)

Signed-off-by: Zhenhui Zhao <zhenhui.zhao@intel.com>

zhao, zhenhui committed Jul 12, 2026 at 12:30 UTC 8e981630c9336233ca9de91452f68918bddbc4e2
2 files changed +33 -7
.buildkite/hardware_tests/cpu.yaml
+14 -1
@@ -141,9 +141,22 @@ steps:
141 commands:
142 - |
143 bash .buildkite/scripts/hardware_ci/run-cpu-test.sh 45m "
144 - 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"
144 + pytest -x -v -s tests/models/multimodal/generation --ignore=tests/models/multimodal/generation/test_pixtral.py --ignore=tests/models/multimodal/generation/test_qwen2_5_vl.py -m cpu_model --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --shard-id=$$BUILDKITE_PARALLEL_JOB"
145 parallelism: 4
146
147 +- label: CPU-Qwen2.5-VL Multimodal Tests
148 + depends_on: []
149 + device: intel_cpu
150 + no_plugin: true
151 + source_file_dependencies:
152 + # - vllm/
153 + - vllm/model_executor/layers/rotary_embedding
154 + - tests/models/multimodal/generation/
155 + commands:
156 + - |
157 + bash .buildkite/scripts/hardware_ci/run-cpu-test.sh 40m "
158 + VLLM_CI_ENV=0 pytest -x -v -s tests/models/multimodal/generation/test_qwen2_5_vl.py"
159 +
160 - label: "Arm CPU Test"
161 depends_on: []
162 soft_fail: false
tests/models/multimodal/generation/test_qwen2_5_vl.py
+19 -6
@@ -5,6 +5,7 @@ import pytest
5
6 from vllm.assets.image import ImageAsset
7 from vllm.multimodal.video import sample_frames_from_video
8 +from vllm.platforms import current_platform
9
10 from ....conftest import VIDEO_ASSETS
11
@@ -52,11 +53,15 @@ def _encoder_cudagraph_config(*, max_vision_items: int) -> dict:
53
54 @pytest.mark.core_model
55 @pytest.mark.parametrize("model", models)
55 -@pytest.mark.parametrize("video_pruning_rate", [0.0, 0.75])
56 +@pytest.mark.parametrize(
57 + "video_pruning_rate", [0.0] if current_platform.is_cpu() else [0.0, 0.75]
58 +)
59 @pytest.mark.parametrize("num_frames", [16])
60 @pytest.mark.parametrize("dtype", [target_dtype])
61 @pytest.mark.parametrize("max_tokens", [128])
59 -@pytest.mark.parametrize("use_bytecode_hook", [True, False])
62 +@pytest.mark.parametrize(
63 + "use_bytecode_hook", [True] if current_platform.is_cpu() else [True, False]
64 +)
65 def test_qwen2_5_vl_evs_functionality(
66 vllm_runner,
67 video_assets,
@@ -109,11 +114,15 @@ def test_qwen2_5_vl_evs_functionality(
114
115 @pytest.mark.core_model
116 @pytest.mark.parametrize("model", models)
112 -@pytest.mark.parametrize("video_pruning_rate", [0.0, 0.75])
117 +@pytest.mark.parametrize(
118 + "video_pruning_rate", [0.0] if current_platform.is_cpu() else [0.0, 0.75]
119 +)
120 @pytest.mark.parametrize("num_frames", [16])
121 @pytest.mark.parametrize("dtype", [target_dtype])
122 @pytest.mark.parametrize("max_tokens", [128])
116 -@pytest.mark.parametrize("use_bytecode_hook", [True, False])
123 +@pytest.mark.parametrize(
124 + "use_bytecode_hook", [True] if current_platform.is_cpu() else [True, False]
125 +)
126 def test_qwen2_5_vl_evs_batched_videos(
127 vllm_runner,
128 video_assets,
@@ -174,7 +183,9 @@ def test_qwen2_5_vl_evs_batched_videos(
183 @pytest.mark.parametrize("model", models)
184 @pytest.mark.parametrize("dtype", [target_dtype])
185 @pytest.mark.parametrize("max_tokens", [128])
177 -@pytest.mark.parametrize("use_bytecode_hook", [True, False])
186 +@pytest.mark.parametrize(
187 + "use_bytecode_hook", [True] if current_platform.is_cpu() else [True, False]
188 +)
189 def test_qwen2_5_vl_window_attention_image(
190 vllm_runner,
191 model,
@@ -210,7 +221,9 @@ def test_qwen2_5_vl_window_attention_image(
221 @pytest.mark.parametrize("model", models)
222 @pytest.mark.parametrize("dtype", [target_dtype])
223 @pytest.mark.parametrize("max_tokens", [128])
213 -@pytest.mark.parametrize("use_bytecode_hook", [True, False])
224 +@pytest.mark.parametrize(
225 + "use_bytecode_hook", [True] if current_platform.is_cpu() else [True, False]
226 +)
227 def test_qwen2_5_vl_window_attention_image_batch(
228 vllm_runner,
229 model,