76
76
build-zen4 :
77
77
runs-on : [self-hosted, zen4]
78
78
needs : check-vm
79
- if : needs.check-vm.outputs.tag == 'zen4' && github.event.inputs.artifact_id == ''
79
+ if : needs.check-vm.outputs.tag == 'zen4' && github.event.inputs.artifact_id == '' && !cancelled()
80
80
container :
81
81
image : ${{ needs.check-vm.outputs.ip }}:5000/modelcloud/gptqmodel:github-ci-v2
82
82
steps :
@@ -179,7 +179,6 @@ jobs:
179
179
- check-vm
180
180
runs-on : self-hosted
181
181
if : always() && !cancelled() && (needs.build-zen4.result == 'success' || github.event.inputs.artifact_id != '')
182
- timeout-minutes : 40
183
182
container :
184
183
image : ${{ needs.check-vm.outputs.ip }}:5000/modelcloud/gptqmodel:github-ci-v2
185
184
strategy :
@@ -207,6 +206,10 @@ jobs:
207
206
fi
208
207
echo "RUN_ID=$run_id" >> $GITHUB_ENV
209
208
echo "RUN_ID=${run_id}"
209
+
210
+ if grep -q "bitblas" tests/${{ matrix.test_script }}.py; then
211
+ echo "BITBLAS=1" >> $GITHUB_ENV
212
+ fi
210
213
211
214
- name : Checkout Codes
212
215
uses : actions/checkout@v4
@@ -230,7 +233,7 @@ jobs:
230
233
fi
231
234
232
235
- name : Download artifact
233
- if : env.DOWNLOADED == ''
236
+ if : env.DOWNLOADED == '' && !cancelled()
234
237
uses : actions/download-artifact@v4
235
238
with :
236
239
name : dist
@@ -239,9 +242,10 @@ jobs:
239
242
240
243
- name : Install wheel
241
244
run : |
242
- uv pip install auto_round optimum bitblas==0.0.1.dev13 parameterized uvicorn -i http://${{ needs.check-vm.outputs.ip }}/simple/ --trusted-host ${{ needs.check-vm.outputs.ip }}
245
+ uv pip install auto_round optimum bitblas==0.0.1.dev13 parameterized intel_extension_for_transformers uvicorn -i http://${{ needs.check-vm.outputs.ip }}/simple/ --trusted-host ${{ needs.check-vm.outputs.ip }}
243
246
uv pip install dist/*.whl
244
- uv pip install torch -U
247
+ bash -c "$(curl -L http://10.0.14.199/scripts/compiler/init_env.sh)" @ 12.4 2.4.1 3.11
248
+ uv pip install transformers -U
245
249
246
250
- name : Check platform
247
251
run : |
@@ -251,7 +255,6 @@ jobs:
251
255
pip show torch
252
256
echo "-----------"
253
257
nvcc --version
254
- rm -rf ~/.cache/bitblas/nvidia/geforce-rtx-4090
255
258
256
259
- name : Find suitable GPU
257
260
run : |
@@ -273,14 +276,16 @@ jobs:
273
276
echo "STEP_TIMESTAMP=$timestamp" >> $GITHUB_ENV
274
277
echo "CUDA_VISIBLE_DEVICES set to $gpu_id, timestamp=$timestamp"
275
278
276
- - name : Install requirements
277
- run : |
278
- bash -c "$(curl -L http://10.0.14.199/scripts/compiler/init_env.sh)" @ 12.4 2.4.1 3.11
279
- uv pip install transformers -U
280
-
281
279
- name : Run tests
282
- if : ${{ !github.event.inputs.test_names || contains(github.event.inputs.test_names, matrix.test_script) }}
283
- run : pytest --durations=0 tests/${{ matrix.test_script }}.py
280
+ timeout-minutes : ${{ env.BITBLAS == '1' && 120 || 40 }}
281
+ if : ${{ !github.event.inputs.test_names || contains(github.event.inputs.test_names, matrix.test_script) }} && !cancelled()
282
+ run : pytest --durations=0 tests/${{ matrix.test_script }}.py || { echo "ERROR=1" >> $GITHUB_ENV; exit 1; }
283
+
284
+ - name : Clear cache
285
+ if : failure() && env.BITBLAS == '1' && env.ERROR == '1'
286
+ run : |
287
+ rm -rf ~/.cache/bitblas/nvidia/geforce-rtx-4090
288
+ echo "clear bitblas cache"
284
289
285
290
- name : Release GPU
286
291
if : always()
@@ -333,7 +338,7 @@ jobs:
333
338
fi
334
339
335
340
- name : Download artifact
336
- if : env.DOWNLOADED == ''
341
+ if : env.DOWNLOADED == '' && !cancelled()
337
342
uses : actions/download-artifact@v4
338
343
with :
339
344
name : dist
@@ -344,5 +349,5 @@ jobs:
344
349
run : uv pip install intel_extension_for_transformers dist/*.whl -i http://${{ needs.check-vm.outputs.ip }}/simple/ --trusted-host ${{ needs.check-vm.outputs.ip }}
345
350
346
351
- name : Run tests
347
- if : ${{ !github.event.inputs.test_names || contains(github.event.inputs.test_names, matrix.test_script) }}
352
+ if : ${{ !github.event.inputs.test_names || contains(github.event.inputs.test_names, matrix.test_script) }} && !cancelled()
348
353
run : pytest --durations=0 tests/${{ matrix.test_script }}.py
0 commit comments