You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CI] Build the benchmark baseline wheel against the base commit's LLVM
prepare-mlir builds one shared MLIR install from the PR's pin and uses it
for both wheels. An LLVM pin bump also carries the source adaptation that
the new pin requires, so the base commit cannot compile against it and the
baseline wheel is never produced. The run ends at "No usable main benchmark
baseline found" (run 32954898547, PR #1051), losing the vs-main comparison
for exactly the PRs whose performance impact is least predictable.
When the LLVM inputs differ from the base commit's, restore the MLIR install
belonging to the base pin and build the baseline wheel against that.
- ci_mlir_cache_key.sh derives the cache key from file contents, making it
computable for the base commit. It replaces hashFiles() and serves both
call sites, so the two keys cannot drift.
- The baseline entry is restored before the shared one and under the same
path. actions/cache derives its version from the path list, so a renamed
restore would miss whatever the key said.
- The unpacked install is checked against its VCSRevision.h. A wrong-pin
baseline is worse than none: it yields a plausible number nobody queries.
- prepare-mlir marks the wheel with the LLVM it was really built against,
and the table is labelled from that marker. Deriving it from the pinned
hashes would mislabel a bump that needed no source adaptation.
A cache miss means no baseline. The wanted entry is the one every non-bump
PR restores on every run, so a miss is the exception.
Changing the key formula invalidates the cache, so every PR cold-builds LLVM
until main's next push saves an entry under the new one.
# Checked against the VCSRevision.h the install ships: a wrong-pin baseline
301
+
# is worse than none, since it yields a plausible number nobody questions.
302
+
#
303
+
# Only a cache hit produces a baseline. Building the old pin here would
304
+
# cost a second llvm-project clone and full LLVM build on a GPU runner, per
305
+
# push, for an advisory number. Revisit if the logs show misses are common.
306
+
- name: Unpack and verify baseline MLIR
307
+
id: base-mlir
308
+
if: steps.base-pin.outputs.pin_changed == 'true'
309
+
continue-on-error: true
310
+
run: |
311
+
set -uo pipefail
312
+
if [ ! -s ./mlir_install_base.tgz ]; then
313
+
echo "::notice title=Benchmark baseline skipped::No cached MLIR install for the base commit's LLVM (${{ steps.base-pin.outputs.base_llvm_hash }}), so the vs-main comparison is skipped; vs latest tag is unaffected. This resolves itself once main has run under that pin."
echo "::notice title=Benchmark baseline uses a different LLVM::Baseline was built against LLVM ${baseline_llvm:0:8}, the PR against its own pin; deltas include LLVM codegen changes."
601
+
fi
439
602
worktree="/tmp/flydsl-bench-main"
440
603
csv="/tmp/bench_main_candidate.csv"
441
604
output="/tmp/bench_main.out"
@@ -460,7 +623,7 @@ jobs:
460
623
status=$?
461
624
if [ "${status}" -eq 0 ] && [ -s "${csv}" ]; then
462
625
cp "${csv}" /tmp/bench_main.csv
463
-
echo "${label}" >/tmp/bench_main_label
626
+
echo "${display_label}" >/tmp/bench_main_label
464
627
else
465
628
echo "Exact main benchmark baseline failed; not retrying older commits."
0 commit comments