"docs/usage/reproducibility.md" did not exist on "51f0b5f7f6ec4aa8199f12bb7df08c9cb5e025db"
gpu.xpu.inc.md 4.09 KB
Newer Older
1
2
<!-- markdownlint-disable MD041 -->
--8<-- [start:installation]
3

4
vLLM initially supports basic model inference and serving on Intel GPU platform.
5

6
7
--8<-- [end:installation]
--8<-- [start:requirements]
8
9

- Supported Hardware: Intel Data Center GPU, Intel ARC GPU
10
- OneAPI requirements: oneAPI 2025.3
11
- 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,
12
13
- Python: 3.12
!!! warning
14
    The provided vllm-xpu-kernels whl is Python3.12 specific so this version is a MUST.
15

16
17
--8<-- [end:requirements]
--8<-- [start:set-up-using-python]
18

19
20
There is no extra information on creating a new Python environment for this device.

21
22
--8<-- [end:set-up-using-python]
--8<-- [start:pre-built-wheels]
23

24
Currently, there are no pre-built XPU wheels.
25

26
27
--8<-- [end:pre-built-wheels]
--8<-- [start:build-wheel-from-source]
28

29
- 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.
30
31
- Second, install Python packages for vLLM XPU backend building:

32
```bash
33
34
git clone https://github.com/vllm-project/vllm.git
cd vllm
35
pip install --upgrade pip
36
pip install -v -r requirements/xpu.txt
37
38
```

39
40
41
42
43
44
45
46
47
48
49
50
51
52
- Then, install the correct Triton package for Intel XPU.

    The default `triton` package (for NVIDIA GPUs) may be installed as a transitive dependency (e.g., via `xgrammar`). For Intel XPU, you must replace it with `triton-xpu`:

    ```bash
    pip uninstall -y triton triton-xpu
    pip install triton-xpu==3.6.0 --extra-index-url https://download.pytorch.org/whl/xpu
    ```

    !!! note
        - `triton` (without suffix) is for NVIDIA GPUs only. On XPU, using it instead of `triton-xpu` can cause correctness or runtime issues.
        - For torch 2.10 (the version used in `requirements/xpu.txt`), the matching package is `triton-xpu==3.6.0`. If you use a different version of torch, check the corresponding `triton-xpu` version in [docker/Dockerfile.xpu](https://github.com/vllm-project/vllm/blob/main/docker/Dockerfile.xpu).

- Finally, build and install vLLM XPU backend:
53

54
```bash
55
VLLM_TARGET_DEVICE=xpu pip install --no-build-isolation -e . -v
56
57
```

58
59
--8<-- [end:build-wheel-from-source]
--8<-- [start:pre-built-images]
60

61
Currently, we release prebuilt XPU images at docker [hub](https://hub.docker.com/r/intel/vllm/tags) based on vLLM released version. For more information, please refer release [note](https://github.com/intel/ai-containers/blob/main/vllm).
62

63
64
--8<-- [end:pre-built-images]
--8<-- [start:build-image-from-source]
65

66
67
68
```bash
docker build -f docker/Dockerfile.xpu -t vllm-xpu-env --shm-size=4g .
docker run -it \
69
70
             --rm \
             --network=host \
71
             --device /dev/dri:/dev/dri \
72
             -v /dev/dri/by-path:/dev/dri/by-path \
73
74
             --ipc=host \
             --privileged \
75
76
77
             vllm-xpu-env
```

78
79
--8<-- [end:build-image-from-source]
--8<-- [start:supported-features]
80

81
XPU platform supports **tensor parallel** inference/serving and also supports **pipeline parallel** as a beta feature for online serving. For **pipeline parallel**, we support it on single node with mp as the backend. For example, a reference execution like following:
82

83
```bash
84
vllm serve facebook/opt-13b \
85
86
     --dtype=bfloat16 \
     --max_model_len=1024 \
87
     --distributed-executor-backend=mp \
88
89
     --pipeline-parallel-size=2 \
     -tp=8
90
91
```

92
By default, a ray instance will be launched automatically if no existing one is detected in the system, with `num-gpus` equals to `parallel_config.world_size`. We recommend properly starting a ray cluster before execution, referring to the [examples/online_serving/run_cluster.sh](https://github.com/vllm-project/vllm/blob/main/examples/online_serving/run_cluster.sh) helper script.
93

94
95
--8<-- [end:supported-features]
--8<-- [start:distributed-backend]
96
97
98

XPU platform uses **torch-ccl** for torch<2.8 and **xccl** for torch>=2.8 as distributed backend, since torch 2.8 supports **xccl** as built-in backend for XPU.

99
--8<-- [end:distributed-backend]