Skip to content

Commit 3e825ec

Browse files
authored
[CI] add nightly failure notify support (#124)
* night failure notify * bug in shell check * update inductor_perf_summary.py
1 parent 35ab427 commit 3e825ec

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

.github/scripts/inductor_perf_summary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ def caculate_passrate(df, compiler):
4141

4242
def get_perf_csv(precision, mode):
4343
target_path = 'inductor_log/huggingface/' + precision + '/inductor_' + args.suite + '_' + precision + '_' + mode + '_xpu_performance.csv'
44-
target_ori_data = pd.read_csv(target_path, header=0, encoding='utf-8', names=['dev', 'name', 'batch_size', 'speedup', 'abs_latency', 'compilation_latency', 'compression_ratio'])
44+
target_ori_data = pd.read_csv(target_path)
4545
target_data = target_ori_data.copy()
46-
target_data.sort_values(by=['name'], key=lambda col: col.str.lower(), inplace=True)
46+
target_data.sort_values(by=['name'])
4747
return target_data
4848

4949

.github/workflows/triton_xpu_backend_e2e_ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ jobs:
142142
143143
- name: Test Results Overview
144144
run: |
145+
set +e
145146
cd ${HOME}/triton-preci/pytorch/inductor_log/huggingface
146147
cd amp_bf16
147148
echo -e "============ Acc Check for HF amp_bf16 ============" | tee -a ./e2e_summary.log

.github/workflows/triton_xpu_backend_e2e_nightly.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ jobs:
140140
141141
- name: ACC Test Results Overview
142142
run: |
143+
set +e
143144
cd ${HOME}/triton-nightly/pytorch/inductor_log/huggingface
144145
cd amp_bf16
145146
echo -e "============ Acc Check for HF amp_bf16 ============" | tee -a ./e2e_summary.log
@@ -234,6 +235,7 @@ jobs:
234235
235236
- name: Perf Test Results Generate and Overview
236237
run: |
238+
set +e
237239
cd ${HOME}/triton-nightly/pytorch
238240
python inductor_perf_summary.py -s huggingface -p amp_bf16 amp_fp16
239241
@@ -242,3 +244,20 @@ jobs:
242244
with:
243245
name: Triton-Inductor-E2E-Nightly-Data
244246
path: /home/gta/triton-nightly/pytorch/inductor_log/
247+
248+
Tests-Failure-And-Report:
249+
runs-on: ubuntu-latest
250+
env:
251+
GH_TOKEN: ${{ github.token }}
252+
needs: [Tests-Env-Prepare, Accuracy-Test, Performance-Test]
253+
if: always()
254+
steps:
255+
- name: Report github issue when failure detected
256+
if: ${{ needs.Tests-Env-Prepare.result == 'failure' || needs.Accuracy-Test.result == 'failure' || needs.Performance-Test.result == 'failure' }}
257+
run: |
258+
build_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
259+
notification_list="${{ secrets.ISSUE_NOTIFICATION_LIST }}"
260+
repo="${{ github.repository }}"
261+
gh --repo $repo issue comment 123 \
262+
--body "E2E Nightly Failed $(date +'%Y-%m-%d'),See: $build_url
263+
cc $notificiation_list"

.github/workflows/triton_xpu_backend_nightly.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,20 @@ jobs:
198198
with:
199199
name: Triton-nightly-data
200200
path: /home/sdp/triton-nightly/triton_src/python/test/unit/language/*.log
201+
202+
Tests-Failure-And-Report:
203+
runs-on: ubuntu-latest
204+
env:
205+
GH_TOKEN: ${{ github.token }}
206+
needs: Nightly-Tests
207+
if: always()
208+
steps:
209+
- name: Report github issue when failure detected
210+
if: ${{ needs.Nightly-Tests.result == 'failure' }}
211+
run: |
212+
build_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
213+
notification_list="${{ secrets.ISSUE_NOTIFICATION_LIST }}"
214+
repo="${{ github.repository }}"
215+
gh --repo $repo issue comment 123 \
216+
--body "UT Nightly Failed $(date +'%Y-%m-%d'),See: $build_url
217+
cc $notificiation_list"

0 commit comments

Comments
 (0)