@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / cb9574eb85
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 8, 12:30 UTC

[XPU][9/N] clean up existing ipex code/doc (#34111)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>

Kunshang Ji committed Feb 11, 2026 at 16:27 UTC cb9574eb8528fca1ecd13ef4cb81cd30a643dbb9
10 files changed +16 -50
docker/Dockerfile.cpu
-1
@@ -134,7 +134,6 @@ WORKDIR /vllm-workspace
134 # Copy test requirements
135 COPY requirements/test.in requirements/cpu-test.in
136
137 -# TODO: Update to 2.9.0 when there is a new build for intel_extension_for_pytorch for that version
137 RUN \
138 sed -i '/mamba_ssm/d' requirements/cpu-test.in && \
139 remove_packages_not_supported_on_aarch64() { \
docs/getting_started/installation/gpu.xpu.inc.md
+5 -4
@@ -6,10 +6,11 @@ vLLM initially supports basic model inference and serving on Intel GPU platform.
6 # --8<-- [start:requirements]
7
8 - Supported Hardware: Intel Data Center GPU, Intel ARC GPU
9 -- OneAPI requirements: oneAPI 2025.1
9 +- OneAPI requirements: oneAPI 2025.3
10 +- Dependency: [vllm-xpu-kernels](https://github.com/vllm-project/vllm-xpu-kernels): a package provide all necessary vllm custom kernel when running vLLM on Intel GPU platform,
11 - Python: 3.12
12 !!! warning
12 - The provided IPEX whl is Python3.12 specific so this version is a MUST.
13 + The provided vllm-xpu-kernels whl is Python3.12 specific so this version is a MUST.
14
15 # --8<-- [end:requirements]
16 # --8<-- [start:set-up-using-python]
@@ -24,7 +25,7 @@ Currently, there are no pre-built XPU wheels.
25 # --8<-- [end:pre-built-wheels]
26 # --8<-- [start:build-wheel-from-source]
27
27 -- First, install required [driver](https://dgpu-docs.intel.com/driver/installation.html#installing-gpu-drivers) and [Intel OneAPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) 2025.1 or later.
28 +- First, install required [driver](https://dgpu-docs.intel.com/driver/installation.html#installing-gpu-drivers) and [Intel OneAPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) 2025.3 or later.
29 - Second, install Python packages for vLLM XPU backend building:
30
31 ```bash
@@ -37,7 +38,7 @@ pip install -v -r requirements/xpu.txt
38 - Then, build and install vLLM XPU backend:
39
40 ```bash
40 -VLLM_TARGET_DEVICE=xpu python setup.py install
41 +VLLM_TARGET_DEVICE=xpu pip install --no-build-isolation -e . -v
42 ```
43
44 # --8<-- [end:build-wheel-from-source]
tests/quantization/test_cpu_wna16.py
+1 -1
@@ -17,7 +17,7 @@ DTYPE = ["bfloat16"]
17
18 @pytest.mark.parametrize("model", MODELS)
19 @pytest.mark.parametrize("dtype", DTYPE)
20 -def test_ipex_quant(vllm_runner, model, dtype):
20 +def test_cpu_quant(vllm_runner, model, dtype):
21 with vllm_runner(model, dtype=dtype) as llm:
22 output = llm.generate_greedy(["The capital of France is"], max_tokens=32)
23 assert output
tests/quantization/test_ipex_quant.py deleted
-32
@@ -1,32 +0,0 @@
1 -# SPDX-License-Identifier: Apache-2.0
2 -# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 -"""Test model set-up and inference for quantized HF models supported
4 -on the CPU/GPU backend using IPEX (including AWQ/GPTQ).
5 -
6 -Validating the configuration and printing results for manual checking.
7 -
8 -Run `pytest tests/quantization/test_ipex_quant.py`.
9 -"""
10 -
11 -import pytest
12 -
13 -from vllm.platforms import current_platform
14 -
15 -MODELS = [
16 - "AMead10/Llama-3.2-1B-Instruct-AWQ",
17 - "shuyuej/Llama-3.2-1B-Instruct-GPTQ", # with g_idx
18 -]
19 -DTYPE = ["bfloat16"]
20 -
21 -
22 -@pytest.mark.skipif(
23 - not current_platform.is_cpu() and not current_platform.is_xpu(),
24 - reason="only supports Intel CPU/XPU backend.",
25 -)
26 -@pytest.mark.parametrize("model", MODELS)
27 -@pytest.mark.parametrize("dtype", DTYPE)
28 -def test_ipex_quant(vllm_runner, model, dtype):
29 - with vllm_runner(model, dtype=dtype, enforce_eager=True) as llm:
30 - output = llm.generate_greedy(["The capital of France is"], max_tokens=4)
31 - assert output
32 - print(output)
vllm/_xpu_ops.py renamed
+3 -3
@@ -53,7 +53,7 @@ if hasattr(torch.ops._xpu_C, "int4_gemm_w4a16"):
53 return torch.empty((M, N), dtype=input.dtype, device=input.device)
54
55
56 -class ipex_ops:
56 +class xpu_ops:
57 @staticmethod
58 def flash_attn_varlen_func(
59 q: torch.Tensor,
@@ -73,7 +73,7 @@ class ipex_ops:
73 cu_seqlens_k: torch.Tensor | None = None,
74 # passed in qwen vl
75 dropout_p: float = 0.0,
76 - # The following parameters are not used in ipex kernel currently,
76 + # The following parameters are not used in xpu kernel currently,
77 # we keep API compatible to CUDA's.
78 scheduler_metadata=None,
79 fa_version: int = 2,
@@ -153,6 +153,6 @@ class ipex_ops:
153 sm_margin=0, # Can be tuned if some SMs are used for communication
154 ) -> None:
155 logger.warning_once(
156 - "get_scheduler_metadata is not implemented for ipex_ops, returning None."
156 + "get_scheduler_metadata is not implemented for xpu_ops, returning None."
157 )
158 return None
vllm/model_executor/layers/quantization/mxfp4.py
+1 -1
@@ -160,7 +160,7 @@ def get_mxfp4_backend(with_lora_support: bool) -> Mxfp4Backend:
160 logger.info_once("Using Triton backend")
161 return Mxfp4Backend.TRITON
162 elif current_platform.is_xpu():
163 - logger.info_once("Using ipex marlin backend on XPU")
163 + logger.info_once("Using xpu backend on XPU")
164 return Mxfp4Backend.MARLIN
165 elif current_platform.is_rocm() and has_triton_kernels():
166 logger.info_once("Using Triton backend")
vllm/model_executor/layers/sparse_attn_indexer.py
+1 -1
@@ -20,7 +20,7 @@ from vllm.v1.worker.workspace import current_workspace_manager
20 if current_platform.is_cuda_alike():
21 from vllm import _custom_ops as ops
22 elif current_platform.is_xpu():
23 - from vllm._ipex_ops import ipex_ops as ops
23 + from vllm._xpu_ops import xpu_ops as ops
24
25 logger = init_logger(__name__)
26
vllm/platforms/cpu.py
-1
@@ -345,7 +345,6 @@ class CpuPlatform(Platform):
345 ld_preload_str += pytorch_libgomp_so
346 os.environ["LD_PRELOAD"] = ld_preload_str
347
348 - # To hint IPEX uses shared memory based AllReduce
348 os.environ["LOCAL_WORLD_SIZE"] = str(
349 vllm_config.parallel_config.tensor_parallel_size
350 )
vllm/v1/attention/backends/fa_utils.py
+4 -5
@@ -23,12 +23,11 @@ if current_platform.is_cuda():
23
24 elif current_platform.is_xpu():
25 from vllm import _custom_ops as ops
26 + from vllm._xpu_ops import xpu_ops
27
28 reshape_and_cache_flash = ops.reshape_and_cache_flash
28 - from vllm._ipex_ops import ipex_ops
29 -
30 - flash_attn_varlen_func = ipex_ops.flash_attn_varlen_func # type: ignore[assignment]
31 - get_scheduler_metadata = ipex_ops.get_scheduler_metadata # type: ignore[assignment]
29 + flash_attn_varlen_func = xpu_ops.flash_attn_varlen_func # type: ignore[assignment]
30 + get_scheduler_metadata = xpu_ops.get_scheduler_metadata # type: ignore[assignment]
31 elif current_platform.is_rocm():
32 try:
33 from flash_attn import flash_attn_varlen_func # type: ignore[no-redef]
@@ -153,7 +152,7 @@ def is_flash_attn_varlen_func_available() -> bool:
152
153 Platform-specific sources:
154 - CUDA: vllm.vllm_flash_attn.flash_attn_varlen_func
156 - - XPU: ipex_ops.flash_attn_varlen_func
155 + - XPU: xpu_ops.flash_attn_varlen_func
156 - ROCm: upstream flash_attn.flash_attn_varlen_func (if available)
157
158 Note: This is separate from the AITER flash attention backend (rocm_aiter_fa.py)
vllm/v1/attention/ops/paged_attn.py
+1 -1
@@ -9,7 +9,7 @@ from vllm.platforms import current_platform
9 if current_platform.is_cuda_alike():
10 from vllm import _custom_ops as ops
11 elif current_platform.is_xpu():
12 - from vllm._ipex_ops import ipex_ops as ops # type: ignore[no-redef]
12 + from vllm._xpu_ops import xpu_ops as ops # type: ignore[no-redef]
13
14
15 class PagedAttention: