22
22
schedule :
23
23
# Run at 02:00 everyday
24
24
- cron : ' 00 18 * * *'
25
+
26
+ workflow_dispatch :
27
+ # Allow manual triggering of the workflow
25
28
26
29
pull_request :
27
30
types : [ labeled ]
@@ -40,7 +43,7 @@ concurrency:
40
43
41
44
jobs :
42
45
test :
43
- if : ${{ contains(github.event.pull_request.labels.*.name, 'performance-test') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') || github.event_name == 'schedule' }}
46
+ if : ${{ contains(github.event.pull_request.labels.*.name, 'performance-test') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
44
47
45
48
name : Benchmarks/vLLM=${{ matrix.vllm_branch }}, vLLM-Ascend=${{ matrix.vllm_ascend_branch }}
46
49
runs-on : ' linux-arm64-npu-static-8'
@@ -111,7 +114,7 @@ jobs:
111
114
pip install -r benchmarks/requirements-bench.txt
112
115
113
116
- name : Run current commit benchmarks
114
- if : github.event_name != 'schedule'
117
+ if : github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'
115
118
run : |
116
119
# Sometimes we only want to run benchmarks on the current commit
117
120
# This is useful for debugging or a release benchmark
@@ -120,12 +123,12 @@ jobs:
120
123
python3 benchmarks/scripts/convert_json_to_markdown.py
121
124
122
125
- name : Generate step summary
123
- if : github.event_name != 'schedule'
126
+ if : github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'
124
127
run : |
125
128
cat ./benchmarks/results/benchmark_results.md >> $GITHUB_STEP_SUMMARY
126
129
127
130
- name : Upload benchmark artifacts
128
- if : github.event_name != 'schedule'
131
+ if : github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'
129
132
uses : actions/upload-artifact@v4
130
133
with :
131
134
name : " benchmark-performance-${{ matrix.vllm_branch }}-${{ matrix.vllm_ascend_branch }}-report"
@@ -135,19 +138,28 @@ jobs:
135
138
overwrite : true
136
139
137
140
- name : Install elastic_tool
138
- if : github.event_name == 'schedule '
141
+ if : github.event_name != 'pull_request '
139
142
run : |
140
143
pip install escli-tool==0.2.1
141
144
142
145
- name : Collect pr info from vllm-project/vllm-ascend
143
- if : github.event_name == 'schedule '
146
+ if : github.event_name != 'pull_request '
144
147
run : |
145
148
# Only get the pull request which may influences performance
146
- git log --pretty=format:"%H %s" -- '**/*.py' ':!docs/*' ':!tests/*' ':!examples/*' > commit_log.txt
149
+ git log --pretty=format:"%H %s" -- '**/*.py' ':!docs/*' ':!tests/*' ':!examples/*' ':!benchmarks/*' > commit_log.txt
147
150
escli check commit_log.txt
151
+
152
+ - name : Prepare benchmark script in advance
153
+ if : github.event_name != 'pull_request'
154
+ # This is for the benchmark iteration, which will change the benchmark scripts while checkouting each commit.
155
+ # We need ensure the benchmark scripts always available.
156
+ run : |
157
+ # Prepare the benchmark script in advance
158
+ mkdir -p /github/home/benchmarks
159
+ cp -r benchmarks/* /github/home/benchmarks/
148
160
149
161
- name : Run benchmark iteration
150
- if : github.event_name == 'schedule '
162
+ if : github.event_name != 'pull_request '
151
163
run : |
152
164
while IFS= read -r line || [[ -n "$line" ]]; do
153
165
commit_id=${line%% *}
@@ -165,8 +177,9 @@ jobs:
165
177
echo "vllm branch: ${{ matrix.vllm_branch }}"
166
178
echo "vllm-ascend branch: ${{ matrix.vllm_ascend_branch }}"
167
179
echo "------------------------"
168
-
180
+ cd /github/home
169
181
bash benchmarks/scripts/run-performance-benchmarks.sh
182
+ cd -
170
183
# send the result to es
171
184
if [[ "${{ github.event_name }}" != "pull request" ]]; then
172
185
escli add --vllm_branch ${{ matrix.vllm_branch }} \
0 commit comments