@@ -114,7 +114,7 @@ def display_comparison(results, threshold, xpu_file, compare_both):
114
114
# Print results
115
115
if regression_records :
116
116
print ("\n 🔴 Regression:" )
117
- regression_display = [r for r in display_records
117
+ regression_display = [r for r in display_records
118
118
if r ['Case Name' ] in [x ['case_name' ] for x in regression_records ]]
119
119
print (tabulate (
120
120
regression_display ,
@@ -126,7 +126,7 @@ def display_comparison(results, threshold, xpu_file, compare_both):
126
126
127
127
if improvement_records :
128
128
print ("\n 🟢 Improvement:" )
129
- improvement_display = [r for r in display_records
129
+ improvement_display = [r for r in display_records
130
130
if r ['Case Name' ] in [x ['case_name' ] for x in improvement_records ]]
131
131
print (tabulate (
132
132
improvement_display ,
@@ -187,7 +187,7 @@ def prepare_df(df):
187
187
188
188
for record , source in [(records_xpu , 'xpu' ), (records_baseline , 'baseline' )]:
189
189
for r in record :
190
- key = tuple ((k , str (v )) for k , v in r .items ()
190
+ key = tuple ((k , str (v )) for k , v in r .items ()
191
191
if k not in ['time(us)' , 'E2E total time(us)' , 'E2E forward time(us)' ])
192
192
193
193
for time_type in ['profile' , 'e2e' ]:
@@ -202,7 +202,7 @@ def prepare_df(df):
202
202
203
203
results = []
204
204
compare_both = not profile_only and not e2e_only
205
- all_keys = set ().union (* [set (data_dict [s ][t ].keys ())
205
+ all_keys = set ().union (* [set (data_dict [s ][t ].keys ())
206
206
for s in data_dict for t in data_dict [s ]])
207
207
208
208
for key in all_keys :
@@ -262,9 +262,9 @@ def main():
262
262
parser .add_argument ('-b' , '--baseline_file' , required = True , help = "XPU OP baseline result csv files dir" )
263
263
parser .add_argument ('-t' , '--threshold' , type = float , default = 0.10 ,
264
264
help = 'Threshold for time difference (default: 0.10 for 10%)' )
265
- parser .add_argument ('--profile-only' , action = 'store_true' ,
265
+ parser .add_argument ('--profile-only' , action = 'store_true' ,
266
266
help = 'Only compare profile time (time(us))' )
267
- parser .add_argument ('--e2e-only' , action = 'store_true' ,
267
+ parser .add_argument ('--e2e-only' , action = 'store_true' ,
268
268
help = 'Only compare E2E time (E2E total time(us))' )
269
269
args = parser .parse_args ()
270
270
0 commit comments