1
1
#
2
2
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
3
- # This file is a part of the vllm-ascend project.
4
3
#
5
4
# Licensed under the Apache License, Version 2.0 (the "License");
6
5
# you may not use this file except in compliance with the License.
13
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
13
# See the License for the specific language governing permissions and
15
14
# limitations under the License.
15
+ # This file is a part of the vllm-ascend project.
16
16
#
17
17
18
18
name : ' e2e test'
@@ -36,80 +36,48 @@ defaults:
36
36
run :
37
37
shell : bash -el {0}
38
38
39
- jobs :
40
- dispatch :
41
- name : vLLM Ascend test (dispatch)
42
- runs-on : ascend-ci-arm64
43
- outputs :
44
- number : ${{ steps.dispatch-device.outputs.number }}
45
- steps :
46
- - name : vLLM Ascend test (dispatch)
47
- id : dispatch-device
48
- run : |
49
- # Try to acquire lock to dispatch devices
50
- lockfile /tmp/dispatch.lock
51
-
52
- # Print npu info
53
- npu-list /dev/null 2>&1
54
-
55
- # Select first available device (Skip reserved davinci1 and davinci0)
56
- NUMBER=$(npu-list /dev/null 2>&1 | grep None | grep -v davinci1 | grep -v davinci0 | head -1 | cut -b 15)
57
- echo "Dispatch to /dev/davinci$NUMBER"
58
- echo "number=$NUMBER" >> $GITHUB_OUTPUT
39
+ concurrency :
40
+ group : pr-${{ github.event.pull_request.number }}
41
+ cancel-in-progress : true
59
42
43
+ jobs :
60
44
test :
61
- needs : [dispatch]
62
- name : vLLM Ascend test (self-host)
63
- runs-on : ascend-ci-arm64 # actionlint-ignore: runner-label
64
-
45
+ name : vLLM Ascend test v0.7.3-dev
46
+ runs-on : linux-arm64-npu-1
65
47
container :
66
48
image : quay.io/ascend/cann:8.0.0-910b-ubuntu22.04-py3.10
67
- volumes :
68
- - /usr/local/dcmi:/usr/local/dcmi
69
- - /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
70
- - /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
71
- # Use self-host cache speed up pip and model download
72
- - /home/action/cache:/github/home/.cache/
73
- # for dispatch lock
74
- - /tmp/:/tmp/
75
- # for vllm and vllm-ascend
76
- - /data1/code:/code
77
- options : >-
78
- --device /dev/davinci${{ needs.dispatch.outputs.number }}
79
- --device /dev/davinci_manager
80
- --device /dev/devmm_svm
81
- --device /dev/hisi_hdc
82
49
env :
83
50
HF_ENDPOINT : https://hf-mirror.com
51
+ HF_TOKEN : ${{ secrets.HF_TOKEN }}
84
52
steps :
85
53
- name : Check npu and CANN info
86
54
run : |
87
55
npu-smi info
88
56
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
89
- # unlock
90
- rm -rf /tmp/dispatch.lock
91
57
92
58
- name : Config mirrors
93
59
run : |
94
60
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
95
61
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
62
+ apt-get update -y
63
+ apt install git -y
64
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
65
+ git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
96
66
97
67
- name : Checkout vllm-project/vllm-ascend repo
98
68
uses : actions/checkout@v4
99
69
100
70
- name : Install system dependencies
101
71
run : |
102
- apt-get update -y
103
72
apt-get -y install `cat packages.txt`
104
73
apt-get -y install gcc g++ cmake libnuma-dev
105
74
106
- - name : Install system dependencies
107
- run : |
108
- apt-get -y install `cat packages.txt`
109
-
110
- - name : Clone vllm-project/vllm repo
111
- run : |
112
- git clone --depth 1 --branch v0.7.3 https://github.com/vllm-project/vllm.git ./vllm-empty
75
+ - name : Checkout vllm-project/vllm repo
76
+ uses : actions/checkout@v4
77
+ with :
78
+ repository : vllm-project/vllm
79
+ ref : v0.7.3
80
+ path : ./vllm-empty
113
81
114
82
- name : Install vllm-project/vllm from source
115
83
working-directory : ./vllm-empty
@@ -118,14 +86,23 @@ jobs:
118
86
119
87
- name : Install vllm-project/vllm-ascend
120
88
run : |
121
- pip uninstall -y numpy
122
89
pip install -r requirements-dev.txt
123
90
pip install -e .
124
91
125
92
- name : Install pta
126
93
run : |
127
- cd /code/pta/
128
- pip install ./torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
94
+ if [ ! -d /root/.cache/pta ]; then
95
+ mkdir -p /root/.cache/pta
96
+ fi
97
+
98
+ if [ ! -f /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl ]; then
99
+ cd /root/.cache/pta
100
+ rm -rf pytorch_v2.5.1_py310*
101
+ wget https://pytorch-package.obs.cn-north-4.myhuaweicloud.com/pta/Daily/v2.5.1/20250320.3/pytorch_v2.5.1_py310.tar.gz
102
+ tar -zxvf pytorch_v2.5.1_py310.tar.gz
103
+ fi
104
+
105
+ pip install /root/.cache/pta/torch_npu-2.5.1.dev20250320-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
129
106
130
107
- name : Run vllm-project/vllm-ascend e2e test
131
108
run : |
@@ -146,23 +123,11 @@ jobs:
146
123
- "vllm_ascend/patch/patch_multi_step_worker.py"
147
124
148
125
- name : Run vllm-project/vllm-ascend key feature test
149
- if : steps.filter.outputs.speculative_tests_changed
126
+ if : steps.filter.outputs.speculative_tests_changed == 'true'
150
127
run : |
151
128
pytest -sv tests/spec_decode/e2e/test_mtp_correctness.py
152
129
pytest -sv tests/spec_decode --ignore=tests/spec_decode/e2e/test_mtp_correctness.py
153
130
154
131
- name : Run vllm-project/vllm test
155
132
run : |
156
133
pytest -sv
157
-
158
- post_cleanup :
159
- name : vLLM Ascend test (post-cleanup)
160
- needs : [test]
161
- runs-on : ascend-ci-arm64 # actionlint-ignore: runner-label
162
- if : always()
163
- steps :
164
- - name : Remove dispatch lock if exists
165
- run : |
166
- if [ -f "/tmp/dispatch.lock" ]; then
167
- rm -f "/tmp/dispatch.lock"
168
- fi
0 commit comments