diff --git a/.buildkite/intel_jobs/misc_intel.yaml b/.buildkite/intel_jobs/misc_intel.yaml index c041af3c9bda..9ef44a2e22d1 100644 --- a/.buildkite/intel_jobs/misc_intel.yaml +++ b/.buildkite/intel_jobs/misc_intel.yaml @@ -415,8 +415,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' 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(