Skip to content

Commit 93a13d6

Browse files
fix the 0 value issue
1 parent f447095 commit 93a13d6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/scripts/op_perf_comparison.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ def compare_op_time_values(xpu_file, baseline_file, threshold=0.05, output_file=
155155
for key in common_keys:
156156
time_xpu = dict_xpu[key]
157157
time_baseline = dict_baseline[key]
158+
159+
# Skip comparison if time_xpu is 0
160+
if time_xpu == 0:
161+
continue
162+
158163
diff = (time_baseline - time_xpu) / time_xpu
159164
# Compare Time, Lower is better
160165
if abs(diff) > threshold:

0 commit comments

Comments
 (0)