[XPU][CI] Fix ExampleConnector KV cache device selection (#51806)

Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>

liuzhenwei committed Aug 11, 2026 at 23:40 UTC d648236199da3146af2abd236a6e32ce17cbb178
3 files changed +3 -3
.buildkite/intel_jobs/test-intel.yaml
+1 -1
@@ -105,7 +105,7 @@ steps:
105 pytest -v -s v1/test_serial_utils.py &&
106 VLLM_DISABLE_COMPILE_CACHE=1 pytest -v -s v1/e2e/general/test_correctness_sliding_window.py &&
107 pytest -v -s v1/spec_decode --ignore=v1/spec_decode/test_max_len.py --ignore=v1/spec_decode/test_speculators_eagle3.py --ignore=v1/spec_decode/test_acceptance_length.py --ignore=v1/spec_decode/test_speculators_correctness.py &&
108 - pytest -v -s v1/kv_connector/unit --ignore=v1/kv_connector/unit/test_example_connector.py --ignore=v1/kv_connector/unit/test_lmcache_integration.py --ignore=v1/kv_connector/unit/test_hf3fs_client.py --ignore=v1/kv_connector/unit/test_hf3fs_connector.py --ignore=v1/kv_connector/unit/test_hf3fs_metadata_server.py --ignore=v1/kv_connector/unit/test_offloading_connector.py'
108 + pytest -v -s v1/kv_connector/unit --ignore=v1/kv_connector/unit/test_lmcache_integration.py --ignore=v1/kv_connector/unit/test_hf3fs_client.py --ignore=v1/kv_connector/unit/test_hf3fs_connector.py --ignore=v1/kv_connector/unit/test_hf3fs_metadata_server.py --ignore=v1/kv_connector/unit/test_offloading_connector.py'
109 - label: "XPU server test"
110 depends_on:
111 - image-build-xpu
tests/v1/kv_connector/unit/test_example_connector.py
+1 -1
@@ -115,7 +115,7 @@ def process_prompt(processor, llm: LLM, question: str, image_urls: list[Image]):
115 ["FLASH_ATTN", "TRITON_ATTN"]
116 if current_platform.is_cuda()
117 else ["TRITON_ATTN"]
118 - if current_platform.is_rocm()
118 + if current_platform.is_rocm() or current_platform.is_xpu()
119 else []
120 ),
121 )
vllm/distributed/kv_transfer/kv_connector/v1/example_connector.py
+1 -1
@@ -180,7 +180,7 @@ class ExampleConnector(KVConnectorBase_V1):
180 layer_name, request.token_ids, request.mm_hashes
181 )
182 kv_cache_cpu = safetensors.torch.load_file(filename)["kv_cache"]
183 - kv_cache = kv_cache_cpu.to("cuda", non_blocking=True)
183 + kv_cache = kv_cache_cpu.to(kv_cache_layer.device, non_blocking=True)
184 if isinstance(attn_metadata, dict):
185 inject_kv_into_layer(
186 kv_cache_layer,