23
23
type : string
24
24
default : ' '
25
25
description : UT scope. `op_regression,op_regression_dev1,op_transformers,op_extended,op_ut,torch_xpu` Delimiter is comma
26
+ disabled_tests :
27
+ required : false
28
+ type : string
29
+ default : ' '
30
+ description : List disabled tests, such as disable_ut or disable_distributed
26
31
python :
27
32
required : false
28
33
type : string
@@ -43,9 +48,9 @@ permissions: read-all
43
48
44
49
jobs :
45
50
ut_test :
46
- runs-on : ${{ inputs.runner }}
47
- if : ${{ inputs.ut != 'xpu_distributed' }}
48
- timeout-minutes : 900
51
+ runs-on : ${{ inputs.runner }}
52
+ if : ${{ inputs.ut != 'xpu_distributed' && !contains(inputs.disabled_tests, 'disable_ut') }}
53
+ timeout-minutes : 300
49
54
env :
50
55
GH_TOKEN : ${{ github.token }}
51
56
NEOReadDebugKeys : ${{ inputs.driver == 'rolling' && '1' || '0' }}
@@ -298,7 +303,39 @@ jobs:
298
303
if [ -e "ut_failure_list.csv" ];then
299
304
cp ut_failure_list.csv ${{ github.workspace }}/ut_log/ut_failure_list.csv
300
305
fi
301
- - name : UT Test Results Check
306
+ echo "UT_NAME=$(echo ${{ inputs.ut }} |sed 's/,/-/g')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}"
307
+ - name : Upload Inductor XPU UT Log
308
+ if : always()
309
+ uses : actions/upload-artifact@v4
310
+ with :
311
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
312
+ path : ${{ github.workspace }}/ut_log
313
+ - name : Upload XPU UT Failure list
314
+ if : always()
315
+ uses : actions/upload-artifact@v4
316
+ with :
317
+ name : XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
318
+ path : ${{ github.workspace }}/ut_log/ut_failure_list.csv
319
+
320
+ ut_test_results_check :
321
+ needs : ut_test
322
+ runs-on : ubuntu-22.04
323
+ timeout-minutes : 30
324
+ env :
325
+ GH_TOKEN : ${{ github.token }}
326
+ ut_skip_issue : 1624
327
+ steps :
328
+ - name : Set the UT name
329
+ run : |
330
+ echo "UT_NAME=$(echo ${{ inputs.ut }} |sed 's/,/-/g')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}"
331
+ - name : Checkout torch-xpu-ops
332
+ uses : actions/checkout@v4
333
+ - name : Download XPU UT Logs
334
+ uses : actions/download-artifact@v4
335
+ with :
336
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
337
+ path : ${{ github.workspace }}/ut_log
338
+ - name : Check UT Results
302
339
shell : bash
303
340
run : |
304
341
repo="${{ github.repository }}"
@@ -319,26 +356,28 @@ jobs:
319
356
$contains_status
320
357
cd ${{ github.workspace }}/ut_log/${ut_suite}
321
358
gh --repo $repo issue view $ut_skip_issue --json body -q .body | sed '/^$/d' > Known_issue.log
359
+ gh api "repos/${{ github.repository }}/issues?labels=skipped" \
360
+ --jq '.[] | select(.pull_request == null) | "Issue #\(.number): \(.title)\n\(.body)\n"' \
361
+ > issues.log
362
+ awk '/Cases:/ {flag=1; next} /^\|\||^$/ {flag=0} flag' issues.log | grep -Eo 'test[^[:space:]]+( \|\| [^[:space:]]+)?' | sed 's/ *|| */ /g' | sort -u > issues_temp.log
363
+ awk '$2 == "op_ut" {print $1}' issues_temp.log > issues_op_ut.log
364
+ cat issues_temp.log | awk '{print $1}' >> Known_issue.log
365
+ awk -F'::' '{print $1}' issues_op_ut.log | sort -u | paste -sd ',' >> Known_issue.log
366
+
322
367
cp ${{ github.workspace }}/.github/scripts/ut_result_check.sh ./
323
368
bash ut_result_check.sh ${ut_suite}
324
369
done
325
370
- name : Upload Inductor XPU UT Log
326
371
if : always()
327
372
uses : actions/upload-artifact@v4
328
373
with :
329
- name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
374
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}-checked
330
375
path : ${{ github.workspace }}/ut_log
331
- - name : Upload XPU UT Failure list
332
- if : always()
333
- uses : actions/upload-artifact@v4
334
- with :
335
- name : XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
336
- path : ${{ github.workspace }}/ut_log/ut_failure_list.csv
337
376
338
377
distributed_ut_test :
339
- runs-on : pvc_e2e
340
- if : contains(inputs.ut, 'xpu_distributed')
341
- timeout-minutes : 900
378
+ runs-on : pytorch-06
379
+ if : ${{ contains(inputs.ut, 'xpu_distributed') && !contains(inputs.disabled_tests, 'disable_distribute') }}
380
+ timeout-minutes : 60
342
381
env :
343
382
GH_TOKEN : ${{ github.token }}
344
383
NEOReadDebugKeys : ${{ inputs.driver == 'rolling' && '1' || '0' }}
@@ -455,7 +494,32 @@ jobs:
455
494
if [ -f ptrace_scope.bk ]; then
456
495
sudo cp ptrace_scope.bk /proc/sys/kernel/yama/ptrace_scope
457
496
fi
458
- - name : UT Test Results Check
497
+ - name : Upload Inductor XPU UT Log
498
+ if : ${{ ! cancelled() }}
499
+ uses : actions/upload-artifact@v4
500
+ with :
501
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-xpu_distributed
502
+ path : ${{ github.workspace }}/ut_log
503
+
504
+ distributed_ut_test_results_check :
505
+ needs : distributed_ut_test
506
+ runs-on : ubuntu-22.04
507
+ timeout-minutes : 30
508
+ env :
509
+ GH_TOKEN : ${{ github.token }}
510
+ ut_skip_issue : 1624
511
+ steps :
512
+ - name : Set the UT name
513
+ run : |
514
+ echo "UT_NAME=$(echo ${{ inputs.ut }} |sed 's/,/-/g')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}"
515
+ - name : Checkout torch-xpu-ops
516
+ uses : actions/checkout@v4
517
+ - name : Download XPU UT Logs
518
+ uses : actions/download-artifact@v4
519
+ with :
520
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-xpu_distributed
521
+ path : ${{ github.workspace }}/ut_log
522
+ - name : Check UT Results
459
523
shell : bash
460
524
run : |
461
525
repo="${{ github.repository }}"
@@ -472,11 +536,18 @@ jobs:
472
536
echo "UT_NAME=$(echo ${{ inputs.ut }} |sed 's/,/-/g')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}"
473
537
cd ${{ github.workspace }}/ut_log/xpu_distributed
474
538
gh --repo $repo issue view $ut_skip_issue --json body -q .body | sed '/^$/d' > Known_issue.log
539
+ gh api "repos/${{ github.repository }}/issues?labels=skipped" \
540
+ --jq '.[] | select(.pull_request == null) | "Issue #\(.number): \(.title)\n\(.body)\n"' \
541
+ > issues.log
542
+ awk '/Cases:/ {flag=1; next} /^\|\||^$/ {flag=0} flag' issues.log | grep -Eo 'test[^[:space:]]+( \|\| [^[:space:]]+)?' | sed 's/ *|| */ /g' | sort -u > issues_temp.log
543
+ awk '$2 == "op_ut" {print $1}' issues_temp.log > issues_op_ut.log
544
+ cat issues_temp.log | awk '{print $1}' >> Known_issue.log
545
+ awk -F'::' '{print $1}' issues_op_ut.log | sort -u | paste -sd ',' >> Known_issue.log
475
546
cp ${{ github.workspace }}/.github/scripts/ut_result_check.sh ./
476
547
bash ut_result_check.sh 'xpu_distributed'
477
548
- name : Upload Inductor XPU UT Log
478
- if : ${{ ! cancelled() }}
549
+ if : always()
479
550
uses : actions/upload-artifact@v4
480
551
with :
481
- name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-xpu_distributed
552
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-xpu_distributed-checked
482
553
path : ${{ github.workspace }}/ut_log
0 commit comments