@@ -152,18 +152,25 @@ jobs:
152
152
run : |
153
153
REFERENCE_RUN_ID="$(gh --repo ${GITHUB_REPOSITORY} issue view ${reference_issue} \
154
154
--json body -q .body |grep "Inductor-XPU-OP-Benchmark-Data" |sed 's/.*: *//')"
155
- gh --repo ${GITHUB_REPOSITORY} run download ${REFERENCE_RUN_ID} -p "Inductor-XPU-OP-Benchmark-Data-*"
156
155
rm -rf ${{ github.workspace }}/reference
157
156
mkdir -p ${{ github.workspace }}/reference
158
- mv -f Inductor-XPU-OP-Benchmark-Data-*-Updated/* ${{ github.workspace }}/reference
159
-
160
157
mkdir -p ${{ github.workspace }}/baseline
161
- if [[ -f "${{ github.workspace }}/reference/new_baseline/baseline_forward_op_summary.csv" ]]; then
162
- cp ${{ github.workspace }}/reference/new_baseline/baseline_forward_op_summary.csv ${{ github.workspace }}/baseline
163
- cp ${{ github.workspace }}/reference/new_baseline/baseline_backward_op_summary.csv ${{ github.workspace }}/baseline
158
+ if [[ -n "${REFERENCE_RUN_ID}" ]]; then
159
+ echo "Using reference run ID: ${REFERENCE_RUN_ID}"
160
+ gh --repo ${GITHUB_REPOSITORY} run download ${REFERENCE_RUN_ID} -p "Inductor-XPU-OP-Benchmark-Data-*"
161
+ mv -f Inductor-XPU-OP-Benchmark-Data-*-Updated/* ${{ github.workspace }}/reference
162
+
163
+ if [[ -f "${{ github.workspace }}/reference/new_baseline/baseline_forward_op_summary.csv" ]]; then
164
+ cp ${{ github.workspace }}/reference/new_baseline/baseline_forward_op_summary.csv ${{ github.workspace }}/baseline
165
+ cp ${{ github.workspace }}/reference/new_baseline/baseline_backward_op_summary.csv ${{ github.workspace }}/baseline
166
+ else
167
+ cp ${{ github.workspace }}/reference/forward_op_summary.csv ${{ github.workspace }}/baseline/baseline_forward_op_summary.csv
168
+ cp ${{ github.workspace }}/reference/backward_op_summary.csv ${{ github.workspace }}/baseline/baseline_backward_op_summary.csv
169
+ fi
164
170
else
165
- cp ${{ github.workspace }}/reference/forward_op_summary.csv ${{ github.workspace }}/baseline/baseline_forward_op_summary.csv
166
- cp ${{ github.workspace }}/reference/backward_op_summary.csv ${{ github.workspace }}/baseline/baseline_backward_op_summary.csv
171
+ echo "No reference run ID found, using local op_benchmark as baseline"
172
+ cp ${{ github.workspace }}/op_benchmark/forward_op_summary.csv ${{ github.workspace }}/baseline/baseline_forward_op_summary.csv
173
+ cp ${{ github.workspace }}/op_benchmark/backward_op_summary.csv ${{ github.workspace }}/baseline/baseline_backward_op_summary.csv
167
174
fi
168
175
- name : Check the OP Regression
169
176
run : |
@@ -175,7 +182,7 @@ jobs:
175
182
- name : Update OP Baseline
176
183
run : |
177
184
pip install tabulate pandas
178
- mkdir ${{ github.workspace }}/new_baseline
185
+ mkdir -p ${{ github.workspace }}/new_baseline
179
186
cp ${{ github.workspace }}/baseline/baseline*.csv ${{ github.workspace }}/new_baseline
180
187
# Update forward op
181
188
python ${{ github.workspace }}/.github/scripts/op_calculate_best_perf.py --xpu ${{ github.workspace }}/op_benchmark/forward_op_summary.csv --baseline ${{ github.workspace }}/new_baseline/baseline_forward_op_summary.csv -r
0 commit comments