1+ #
2+ # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
3+ # This file is a part of the vllm-ascend project.
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+ #
17+
18+ name : ' e2e test'
19+
20+ on :
21+ pull_request :
22+ branches :
23+ - ' main'
24+ - ' *-dev'
25+ paths :
26+ - ' *.txt'
27+ - ' **/*.py'
28+ - ' .github/workflows/vllm_ascend_test.yaml'
29+ - ' !docs/**'
30+ - ' pytest.ini'
31+
32+ # Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
33+ # declared as "shell: bash -el {0}" on steps that need to be properly activated.
34+ # It's used to activate ascend-toolkit environment variables.
35+ defaults :
36+ run :
37+ shell : bash -el {0}
38+
39+ concurrency :
40+ group : pr-${{ github.event.pull_request.number }}
41+ cancel-in-progress : true
42+
43+ jobs :
44+ test-singlenpu :
45+ name : vLLM Ascend test main(single-npu)
46+ runs-on : linux-arm64-npu-1 # actionlint-ignore: runner-label
47+ container :
48+ image : quay.io/ascend/cann:8.0.0-910b-ubuntu22.04-py3.10
49+ steps :
50+ - name : Check npu and CANN info
51+ run : |
52+ npu-smi info
53+ cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
54+
55+ - name : Config mirrors
56+ run : |
57+ sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
58+ pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
59+ apt-get update -y
60+ apt install git -y
61+ git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
62+
63+ - name : Checkout vllm-project/vllm-ascend repo
64+ uses : actions/checkout@v4
65+
66+ - name : Install system dependencies
67+ run : |
68+ apt-get -y install `cat packages.txt`
69+ apt-get -y install gcc g++ cmake libnuma-dev
70+
71+ - name : Checkout vllm-project/vllm repo
72+ uses : actions/checkout@v4
73+ with :
74+ repository : vllm-project/vllm
75+ path : ./vllm-empty
76+
77+ - name : Install vllm-project/vllm from source
78+ working-directory : ./vllm-empty
79+ run : |
80+ VLLM_TARGET_DEVICE=empty pip install -e .
81+
82+ - name : Install vllm-project/vllm-ascend
83+ run : |
84+ pip install -r requirements-dev.txt
85+ pip install -e .
86+
87+ - name : Install pta
88+ run : |
89+ if [ ! -d /root/.cache/pta ]; then
90+ mkdir -p /root/.cache/pta
91+ fi
92+
93+ if [ ! -f /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ]; then
94+ cd /root/.cache/pta
95+ rm -rf pytorch_v2.5.1_py310*
96+ wget https://pytorch-package.obs.cn-north-4.myhuaweicloud.com/pta/Daily/v2.5.1/20250320.3/pytorch_v2.5.1_py310.tar.gz
97+ tar -zxvf pytorch_v2.5.1_py310.tar.gz
98+ fi
99+
100+ pip install /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
101+
102+ - name : Run vllm-project/vllm-ascend test on V0 engine
103+ env :
104+ VLLM_USE_V1 : 0
105+ HF_ENDPOINT : https://hf-mirror.com
106+ run : |
107+ VLLM_USE_V1=0 pytest -sv -m 'not multinpu' tests
108+
109+ - name : Run vllm-project/vllm-ascend test for V1 Engine
110+ env :
111+ VLLM_USE_V1 : 1
112+ VLLM_WORKER_MULTIPROC_METHOD : spawn
113+ HF_ENDPOINT : https://hf-mirror.com
114+ run : |
115+ pytest -sv -m 'not multinpu' tests
116+
117+ - name : Run vllm-project/vllm test for V0 Engine
118+ env :
119+ VLLM_USE_V1 : 0
120+ PYTORCH_NPU_ALLOC_CONF : max_split_size_mb:256
121+ HF_ENDPOINT : https://hf-mirror.com
122+ run : |
123+ pytest -sv
124+
125+ test-multinpu :
126+ name : vLLM Ascend test main(multi-npu)
127+ runs-on : linux-arm64-npu-4
128+ container :
129+ image : ascendai/cann:8.0.0-910b-ubuntu22.04-py3.10
130+ env :
131+ HF_ENDPOINT : https://hf-mirror.com
132+ HF_TOKEN : ${{ secrets.HF_TOKEN }}
133+ steps :
134+ - name : Check npu and CANN info
135+ run : |
136+ npu-smi info
137+ cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
138+
139+ - name : Config mirrors
140+ run : |
141+ # sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
142+ pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
143+
144+ - name : Install system dependencies
145+ run : |
146+ apt-get update -y
147+ apt-get -y install git wget
148+
149+ - name : Config git
150+ run : |
151+ git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
152+
153+ - name : Checkout vllm-project/vllm-ascend repo
154+ uses : actions/checkout@v4
155+
156+ - name : Install dependencies
157+ run : |
158+ pip install -r requirements-dev.txt
159+
160+ - name : Checkout vllm-project/vllm repo
161+ uses : actions/checkout@v4
162+ with :
163+ repository : vllm-project/vllm
164+ path : ./vllm-empty
165+
166+ - name : Install vllm-project/vllm from source
167+ working-directory : ./vllm-empty
168+ run : |
169+ VLLM_TARGET_DEVICE=empty pip install -e .
170+
171+ - name : Install vllm-project/vllm-ascend
172+ run : |
173+ pip install -r requirements-dev.txt
174+ pip install -e .
175+
176+ - name : Install pta
177+ run : |
178+ if [ ! -d /root/.cache/pta ]; then
179+ mkdir -p /root/.cache/pta
180+ fi
181+
182+ if [ ! -f /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ]; then
183+ cd /root/.cache/pta
184+ rm -rf pytorch_v2.5.1_py310*
185+ wget https://pytorch-package.obs.cn-north-4.myhuaweicloud.com/pta/Daily/v2.5.1/20250320.3/pytorch_v2.5.1_py310.tar.gz
186+ tar -zxvf pytorch_v2.5.1_py310.tar.gz
187+ fi
188+
189+ pip install /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
190+ - name : Run vllm-project/vllm-ascend test on V0 engine
191+ env :
192+ VLLM_USE_V1 : 0
193+ HF_ENDPOINT : https://hf-mirror.com
194+ run : |
195+ VLLM_USE_V1=0 pytest -sv -m 'multinpu' tests
196+
197+ - name : Run vllm-project/vllm-ascend test for V1 Engine
198+ env :
199+ VLLM_USE_V1 : 1
200+ VLLM_WORKER_MULTIPROC_METHOD : spawn
201+ HF_ENDPOINT : https://hf-mirror.com
202+ run : |
203+ pytest -sv -m 'multinpu' tests
204+
205+ test-singlenpu-v0_8_3 :
206+ name : vLLM Ascend test v0.8.3(single-npu)
207+ runs-on : linux-arm64-npu-1 # actionlint-ignore: runner-label
208+ container :
209+ image : quay.io/ascend/cann:8.0.0-910b-ubuntu22.04-py3.10
210+ steps :
211+ - name : Check npu and CANN info
212+ run : |
213+ npu-smi info
214+ cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
215+
216+ - name : Config mirrors
217+ run : |
218+ sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
219+ pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
220+ apt-get update -y
221+ apt install git -y
222+ git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
223+
224+ - name : Checkout vllm-project/vllm-ascend repo
225+ uses : actions/checkout@v4
226+
227+ - name : Install system dependencies
228+ run : |
229+ apt-get -y install `cat packages.txt`
230+ apt-get -y install gcc g++ cmake libnuma-dev
231+
232+ - name : Checkout vllm-project/vllm repo
233+ uses : actions/checkout@v4
234+ with :
235+ repository : vllm-project/vllm
236+ ref : v0.8.3
237+ path : ./vllm-empty
238+
239+ - name : Install vllm-project/vllm from source
240+ working-directory : ./vllm-empty
241+ run : |
242+ VLLM_TARGET_DEVICE=empty pip install -e .
243+
244+ - name : Install vllm-project/vllm-ascend
245+ run : |
246+ pip install -r requirements-dev.txt
247+ pip install -e .
248+
249+ - name : Install pta
250+ run : |
251+ if [ ! -d /root/.cache/pta ]; then
252+ mkdir -p /root/.cache/pta
253+ fi
254+
255+ if [ ! -f /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ]; then
256+ cd /root/.cache/pta
257+ rm -rf pytorch_v2.5.1_py310*
258+ wget https://pytorch-package.obs.cn-north-4.myhuaweicloud.com/pta/Daily/v2.5.1/20250320.3/pytorch_v2.5.1_py310.tar.gz
259+ tar -zxvf pytorch_v2.5.1_py310.tar.gz
260+ fi
261+
262+ pip install /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
263+
264+ - name : Run vllm-project/vllm-ascend test on V0 engine
265+ env :
266+ VLLM_USE_V1 : 0
267+ HF_ENDPOINT : https://hf-mirror.com
268+ run : |
269+ VLLM_USE_V1=0 pytest -sv -m 'not multinpu' tests
270+
271+ - name : Run vllm-project/vllm-ascend test for V1 Engine
272+ env :
273+ VLLM_USE_V1 : 1
274+ VLLM_WORKER_MULTIPROC_METHOD : spawn
275+ HF_ENDPOINT : https://hf-mirror.com
276+ run : |
277+ pytest -sv -m 'not multinpu' tests
278+
279+ - name : Run vllm-project/vllm test for V0 Engine
280+ env :
281+ VLLM_USE_V1 : 0
282+ PYTORCH_NPU_ALLOC_CONF : max_split_size_mb:256
283+ HF_ENDPOINT : https://hf-mirror.com
284+ run : |
285+ pytest -sv
286+
287+ test-multinpu-v0_8_3 :
288+ name : vLLM Ascend test v0.8.3(multi-npu)
289+ runs-on : linux-arm64-npu-4
290+ needs : test-multinpu
291+ container :
292+ image : ascendai/cann:8.0.0-910b-ubuntu22.04-py3.10
293+ env :
294+ HF_ENDPOINT : https://hf-mirror.com
295+ HF_TOKEN : ${{ secrets.HF_TOKEN }}
296+ steps :
297+ - name : Check npu and CANN info
298+ run : |
299+ npu-smi info
300+ cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
301+
302+ - name : Config mirrors
303+ run : |
304+ # sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
305+ pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
306+
307+ - name : Install system dependencies
308+ run : |
309+ apt-get update -y
310+ apt-get -y install git wget
311+
312+ - name : Config git
313+ run : |
314+ git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
315+
316+ - name : Checkout vllm-project/vllm-ascend repo
317+ uses : actions/checkout@v4
318+
319+ - name : Install dependencies
320+ run : |
321+ pip install -r requirements-dev.txt
322+
323+ - name : Checkout vllm-project/vllm repo
324+ uses : actions/checkout@v4
325+ with :
326+ repository : vllm-project/vllm
327+ ref : v0.8.3
328+ path : ./vllm-empty
329+
330+ - name : Install vllm-project/vllm from source
331+ working-directory : ./vllm-empty
332+ run : |
333+ VLLM_TARGET_DEVICE=empty pip install -e .
334+
335+ - name : Install vllm-project/vllm-ascend
336+ run : |
337+ pip install -r requirements-dev.txt
338+ pip install -e .
339+
340+ - name : Install pta
341+ run : |
342+ if [ ! -d /root/.cache/pta ]; then
343+ mkdir -p /root/.cache/pta
344+ fi
345+
346+ if [ ! -f /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ]; then
347+ cd /root/.cache/pta
348+ rm -rf pytorch_v2.5.1_py310*
349+ wget https://pytorch-package.obs.cn-north-4.myhuaweicloud.com/pta/Daily/v2.5.1/20250320.3/pytorch_v2.5.1_py310.tar.gz
350+ tar -zxvf pytorch_v2.5.1_py310.tar.gz
351+ fi
352+
353+ pip install /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
354+ - name : Run vllm-project/vllm-ascend test on V0 engine
355+ env :
356+ VLLM_USE_V1 : 0
357+ HF_ENDPOINT : https://hf-mirror.com
358+ run : |
359+ VLLM_USE_V1=0 pytest -sv -m 'multinpu' tests
360+
361+ - name : Run vllm-project/vllm-ascend test for V1 Engine
362+ env :
363+ VLLM_USE_V1 : 1
364+ VLLM_WORKER_MULTIPROC_METHOD : spawn
365+ HF_ENDPOINT : https://hf-mirror.com
366+ run : |
367+ pytest -sv -m 'multinpu' tests
0 commit comments