[Bugfix][XPU] Fix free-memory abort and num_speculative_steps crash on XPU (#5330)

Signed-off-by: Joshna Medisetty <joshna.medisetty@intel.com>
Co-authored-by: Chendi.Xue <chendi.xue@intel.com>
This commit is contained in:
Joshna-MedisettyandChendi.Xue authored and GitHub committed 2026-07-23 17:17:00 +00:00
1 parent 4c23a3164b
commit 0fe5d73a63
5 files changed
+25 -2

No files matched your search

+9
View File
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import os
import torch
from vllm.config import VllmConfig
from vllm.config.kernel import IrOpPriorityConfig
@@ -13,6 +15,13 @@ from vllm_omni.platforms.interface import OmniPlatform, OmniPlatformEnum
logger = init_logger(__name__)
# Use the native query; vLLM's XPU custom op reports free=0 in spawned workers.
torch.accelerator.get_memory_info = lambda device=None: torch.xpu.mem_get_info(device)
# The XPU sampler kernel is broken for omni on the current vLLM; use the native path.
os.environ.setdefault("VLLM_XPU_USE_SAMPLER_KERNEL", "0")
class XPUOmniPlatform(OmniPlatform, XPUPlatform):
"""XPU/Intel GPU implementation of OmniPlatform.