From 73b6f4df4d559da2e28b5f3fa9e2d536e4964d91 Mon Sep 17 00:00:00 2001 From: Chaojun Zhang Date: Mon, 26 Oct 2026 02:50:30 +0000 Subject: [PATCH 1/2] [XPU][Test] Use current platform device in test_compile_ranges Signed-off-by: Chaojun Zhang --- tests/compile/test_compile_ranges.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/compile/test_compile_ranges.py b/tests/compile/test_compile_ranges.py index 4dfea42a6b4a..73d665a25816 100644 --- a/tests/compile/test_compile_ranges.py +++ b/tests/compile/test_compile_ranges.py @@ -22,10 +22,13 @@ from vllm.config.scheduler import SchedulerConfig from vllm.config.utils import Range from vllm.forward_context import set_forward_context +from vllm.platforms import current_platform BATCH_SIZE = 64 MLP_SIZE = 128 +DEVICE_TYPE = current_platform.device_type + @support_torch_compile class TestModel(nn.Module): @@ -77,7 +80,7 @@ def test_compile_ranges(disable_vllm_compile_cache): Range(start=33, end=8192), ] ) - torch.set_default_device("cuda") + torch.set_default_device(DEVICE_TYPE) vllm_config = VllmConfig( scheduler_config=SchedulerConfig( max_num_batched_tokens=8192, @@ -172,7 +175,7 @@ def test_compile_sizes_produce_static_shapes(disable_vllm_compile_cache): """Verify that compile_sizes entries are compiled with fully concrete shapes (no SymInts), while compile_ranges entries retain dynamic shapes.""" checker = PostGradStaticShapeChecker() - torch.set_default_device("cuda") + torch.set_default_device(DEVICE_TYPE) vllm_config = VllmConfig( scheduler_config=SchedulerConfig( max_num_batched_tokens=8192, @@ -223,7 +226,7 @@ def test_inductor_cache_compile_ranges(disable_vllm_compile_cache): max_model_len=8192, is_encoder_decoder=False, ) - torch.set_default_device("cuda") + torch.set_default_device(DEVICE_TYPE) def create_vllm_config(): return VllmConfig( From 3b4fe7ce04a5eefbd345b197d754e347baf25313 Mon Sep 17 00:00:00 2001 From: Chaojun Zhang Date: Mon, 26 Oct 2026 02:58:26 +0000 Subject: [PATCH 2/2] [XPU][CI] Run test_compile_ranges in Intel fusion unit tests Signed-off-by: Chaojun Zhang --- .buildkite/intel_jobs/misc_intel.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.buildkite/intel_jobs/misc_intel.yaml b/.buildkite/intel_jobs/misc_intel.yaml index 34e9067a3ab8..3d3ae4710444 100644 --- a/.buildkite/intel_jobs/misc_intel.yaml +++ b/.buildkite/intel_jobs/misc_intel.yaml @@ -385,8 +385,10 @@ steps: source_file_dependencies: - vllm/compilation/ - tests/compile/passes/test_qk_norm_rope_fusion.py + - tests/compile/test_compile_ranges.py commands: - >- bash .buildkite/scripts/hardware_ci/run-intel-test.sh 'cd tests && - pytest -v -s compile/passes/test_qk_norm_rope_fusion.py' + pytest -v -s compile/passes/test_qk_norm_rope_fusion.py && + pytest -v -s compile/test_compile_ranges.py'