File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : ' Benchmark'
2
2
3
- on : pull_request
3
+ on :
4
+ pull_request_review :
5
+ types : [submitted]
6
+ workflow_dispatch :
4
7
5
8
jobs :
6
9
file-changes :
@@ -20,11 +23,12 @@ jobs:
20
23
21
24
self :
22
25
name : Georgia Tech | Phoenix (NVHPC)
23
- if : github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'
26
+ if : github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' && ${{ github.event.review.state == 'approved' }}
24
27
needs : file-changes
25
28
strategy :
26
29
matrix :
27
30
device : ['cpu', 'gpu']
31
+ fail-fast : false
28
32
runs-on :
29
33
group : phoenix
30
34
labels : gt
56
60
(cd pr && . ./mfc.sh load -c p -m g)
57
61
(cd pr && ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}.yaml ../pr/bench-${{ matrix.device }}.yaml)
58
62
63
+ - name : Print Logs
64
+ if : always()
65
+ run : |
66
+ cat pr/bench-${{ matrix.device }}.* 2>/dev/null || true
67
+ cat master/bench-${{ matrix.device }}.* 2>/dev/null || true
68
+
59
69
- name : Archive Logs
60
70
uses : actions/upload-artifact@v4
61
71
if : always()
Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ def diff():
125
125
if not math .isfinite (lhs_summary [target .name ]["exec" ]) or not math .isfinite (rhs_summary [target .name ]["exec" ]):
126
126
err = 1
127
127
cons .print (f"lhs_summary or rhs_summary reports non-real exec time for { target .name } - Case: { slug } " )
128
-
129
128
try :
130
129
exec_time_value = lhs_summary [target .name ]["exec" ] / rhs_summary [target .name ]["exec" ]
131
130
if exec_time_value < 0.9 :
@@ -139,10 +138,10 @@ def diff():
139
138
grind_time_value = lhs_summary [target .name ]["grind" ] / rhs_summary [target .name ]["grind" ]
140
139
speedups [i ] += f" & Grind: { grind_time_value :.2f} "
141
140
if grind_time_value < 0.95 :
142
- raise MFCException (f"Benchmarking failed since grind time speedup for { target .name } below acceptable threshold (<0.98) - Case: { slug } " )
141
+ cons .print (f"[bold red]Error[/bold red]: Benchmarking failed since grind time speedup for { target .name } below acceptable threshold (<0.95) - Case: { slug } " )
142
+ err = 1
143
143
except Exception as _ :
144
- err = 1
145
- cons .print (f"lhs_summary or rhs_summary reports non-real grind time for { target .name } - Case: { slug } " )
144
+ pass
146
145
147
146
table .add_row (f"[magenta]{ slug } [/magenta]" , * speedups )
148
147
You can’t perform that action at this time.
0 commit comments