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 15, 19:45 UTC
[Hardware][Intel GPU] upgrade IPEX dependency to 2.6.10. (#14564)
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Kunshang Ji committed
Mar 11, 2025 at 10:11 UTC
c6e14a61ab90370ca924907d3298ecddbb840884
3 files changed
+35
-22
Dockerfile.xpu
+10
-12
@@ -1,4 +1,4 @@
1
-FROM intel/oneapi-basekit:2024.2.1-0-devel-ubuntu22.04 AS vllm-base
1
+FROM intel/deep-learning-essentials:2025.0.1-0-devel-ubuntu22.04 AS vllm-base
2
3
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/intel-oneapi-archive-keyring.gpg > /dev/null && \
4
echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main " | tee /etc/apt/sources.list.d/oneAPI.list && \
@@ -21,7 +21,8 @@ RUN apt-get update -y && \
21
python3 \
22
python3-dev \
23
python3-pip \
24
- # vim \
24
+ libze-intel-gpu-dev \
25
+ libze-intel-gpu1 \
26
wget
27
28
WORKDIR /workspace/vllm
@@ -32,19 +33,10 @@ RUN --mount=type=cache,target=/root/.cache/pip \
33
pip install --no-cache-dir \
34
-r requirements/xpu.txt
35
35
-RUN git clone https://github.com/intel/pti-gpu && \
36
- cd pti-gpu/sdk && \
37
- git checkout 6c491f07a777ed872c2654ca9942f1d0dde0a082 && \
38
- mkdir build && \
39
- cd build && \
40
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/icpx_toolchain.cmake -DBUILD_TESTING=OFF .. && \
41
- make -j && \
42
- cmake --install . --config Release --prefix "/usr/local"
43
-
36
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/"
37
38
COPY . .
47
-ARG GIT_REPO_CHECK
39
+ARG GIT_REPO_CHECK=0
40
RUN --mount=type=bind,source=.git,target=.git \
41
if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh; fi
42
@@ -54,6 +46,12 @@ RUN --mount=type=cache,target=/root/.cache/pip \
46
--mount=type=bind,source=.git,target=.git \
47
python3 setup.py install
48
49
+# Please refer xpu doc, we need manually install intel-extension-for-pytorch 2.6.10+xpu due to there are some conflict dependencies with torch 2.6.0+xpu
50
+# FIXME: This will be fix in ipex 2.7. just leave this here for awareness.
51
+RUN --mount=type=cache,target=/root/.cache/pip \
52
+ pip install intel-extension-for-pytorch==2.6.10+xpu \
53
+ --extra-index-url=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
54
+
55
CMD ["/bin/bash"]
56
57
FROM vllm-base AS vllm-openai
docs/source/getting_started/installation/gpu/xpu.inc.md
+13
-5
@@ -9,7 +9,7 @@ There are no pre-built wheels or images for this device, so you must build vLLM
9
## Requirements
10
11
- Supported Hardware: Intel Data Center GPU, Intel ARC GPU
12
-- OneAPI requirements: oneAPI 2024.2
12
+- OneAPI requirements: oneAPI 2025.0
13
14
## Set up using Python
15
@@ -19,21 +19,27 @@ Currently, there are no pre-built XPU wheels.
19
20
### Build wheel from source
21
22
-- First, install required driver and intel OneAPI 2024.2 or later.
22
+- First, install required driver and Intel OneAPI 2025.0 or later.
23
- Second, install Python packages for vLLM XPU backend building:
24
25
```console
26
-source /opt/intel/oneapi/setvars.sh
26
pip install --upgrade pip
27
pip install -v -r requirements/xpu.txt
28
```
29
31
-- Finally, build and install vLLM XPU backend:
30
+- Then, build and install vLLM XPU backend:
31
32
```console
33
VLLM_TARGET_DEVICE=xpu python setup.py install
34
```
35
36
+- Finally, due to a known issue of conflict dependency(oneapi related) in torch-xpu 2.6 and ipex-xpu 2.6, we install ipex here. This will be fixed in the ipex-xpu 2.7.
37
+
38
+```console
39
+pip install intel-extension-for-pytorch==2.6.10+xpu \
40
+ --extra-index-url=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
41
+```
42
+
43
:::{note}
44
- FP16 is the default data type in the current XPU backend. The BF16 data
45
type is supported on Intel Data Center GPU, not supported on Intel Arc GPU yet.
@@ -59,7 +65,7 @@ $ docker run -it \
65
66
## Supported features
67
62
-XPU platform supports tensor-parallel inference/serving and also supports pipeline parallel as a beta feature for online serving. We requires Ray as the distributed runtime backend. For example, a reference execution likes following:
68
+XPU platform supports **tensor parallel** inference/serving and also supports **pipeline parallel** as a beta feature for online serving. We requires Ray as the distributed runtime backend. For example, a reference execution likes following:
69
70
```console
71
python -m vllm.entrypoints.openai.api_server \
@@ -73,3 +79,5 @@ python -m vllm.entrypoints.openai.api_server \
79
```
80
81
By default, a ray instance will be launched automatically if no existing one is detected in system, with `num-gpus` equals to `parallel_config.world_size`. We recommend properly starting a ray cluster before execution, referring to the <gh-file:examples/online_serving/run_cluster.sh> helper script.
82
+
83
+There are some new features coming with ipex-xpu 2.6, eg: **chunked prefill**, **V1 engine support**, **lora**, **MoE**, etc.
requirements/xpu.txt
+12
-5
@@ -1,7 +1,7 @@
1
# Common dependencies
2
-r common.txt
3
4
-ray >= 2.9
4
+ray>=2.9
5
cmake>=3.26
6
ninja
7
packaging
@@ -9,9 +9,16 @@ setuptools-scm>=8
9
setuptools>=75.8.0
10
wheel
11
jinja2
12
+datasets # for benchmark scripts
13
13
-torch @ https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/torch-2.5.0a0%2Bgite84e33f-cp310-cp310-linux_x86_64.whl
14
-intel-extension-for-pytorch @ https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/intel_extension_for_pytorch-2.5.10%2Bgit9d489a8-cp310-cp310-linux_x86_64.whl
15
-oneccl_bind_pt @ https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_dev/xpu/oneccl_bind_pt-2.5.0%2Bxpu-cp310-cp310-linux_x86_64.whl
14
+torch==2.6.0+xpu
15
+torchaudio
16
+torchvision
17
+pytorch-triton-xpu
18
+--extra-index-url=https://download.pytorch.org/whl/xpu
19
17
-triton-xpu == 3.0.0b1
20
+# Please refer xpu doc, we need manually install intel-extension-for-pytorch 2.6.10+xpu due to there are some conflict dependencies with torch 2.6.0+xpu
21
+# FIXME: This will be fix in ipex 2.7. just leave this here for awareness.
22
+# intel-extension-for-pytorch==2.6.10+xpu
23
+oneccl_bind_pt==2.6.0+xpu
24
+--extra-index-url=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
\ No newline at end of file