Skip to content

Commit d161430

Browse files
authored
Fix /bench-verify target dirs (#882)
* Give each ref its own host cargo target dir * Retire artifacts copied out of the shared dir * Correct the host-side root cause note
1 parent d0c1d8c commit d161430

2 files changed

Lines changed: 136 additions & 58 deletions

File tree

.github/workflows/bench-verify.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ jobs:
3838
runs-on: [self-hosted, bench]
3939
# Job cap. On a cold runner the recursion BUILDS dominate: per ref a guest build, a
4040
# prover-test build, and a measuring-CLI build (the CLI is built FROM each ref so it
41-
# understands that ref's own guest syscalls). Cached in /tmp; build-std is per ref and
42-
# the host cargo target is shared across ref worktrees (see the recursion step's env),
43-
# so the second ref's native builds mostly reuse the first ref's compiled deps.
41+
# understands that ref's own guest syscalls). Cached in /tmp; build-std and the host
42+
# cargo target are both per ref (see the recursion step's env), so a ref's second and
43+
# later presets reuse its own compiled deps — but the two refs never share a dir.
4444
# 125 rather than 90 to absorb the continuation arms: a 20-tx continuation prove per
4545
# ref on each side of the verifier bench, plus a 20-tx (was 4-tx) block for the cycle
4646
# comparison. Keep this ABOVE the sum of the step caps below (50 + 70 = 120) so a
@@ -134,10 +134,11 @@ jobs:
134134
# continuations, via the `continuation` guest). One exact `execute --cycles`
135135
# reading per ref (no ABBA); blowup2-block's dumped blob is cached by ref SHA
136136
# (bench_recursion_cycles.sh), so a repeat run skips re-proving.
137-
# GUEST_TARGET_DIR is a BASE path — bench_recursion_cycles.sh appends the ref SHA
138-
# so each worktree owns its guest target dir (sharing one dir across refs made
139-
# cargo mix rlibs from both worktrees and broke every regime after the first).
140-
# HOST_TARGET_DIR is genuinely shared: native deps compile once for both refs.
137+
# GUEST_TARGET_DIR and HOST_TARGET_DIR are BASE paths — bench_recursion_cycles.sh
138+
# appends the ref SHA so each worktree owns its target dirs. Sharing one dir across
139+
# refs made cargo mix rlibs from both worktrees: loudly on the guest side (broke
140+
# every regime after the first) and SILENTLY on the host side (cargo declared the
141+
# second ref fresh and the run measured the first ref's binary).
141142
# continue-on-error + `!cancelled()` isolate this from the verifier bench above.
142143
- name: Run recursion guest cycle benchmark
143144
id: recursion
@@ -148,11 +149,11 @@ jobs:
148149
timeout-minutes: 70
149150
env:
150151
HEAD_SHA: ${{ steps.cfg.outputs.head_sha }}
151-
# Base path for the per-ref guest target dirs (`<base>_<sha8>`) and the shared
152-
# host cargo target, both rooted under the script's /tmp cache dir: build-std
153-
# and native deps survive across runs instead of being rebuilt cold.
152+
# Base paths for the per-ref guest and host target dirs (`<base>_<sha8>`), both
153+
# rooted under the script's /tmp cache dir: build-std and native deps survive
154+
# across runs (and across presets within a run) instead of being rebuilt cold.
154155
GUEST_TARGET_DIR: /tmp/recursion_cycles_run/guest_target
155-
HOST_TARGET_DIR: /tmp/recursion_cycles_run/shared_host_target
156+
HOST_TARGET_DIR: /tmp/recursion_cycles_run/host_target
156157
run: |
157158
export SYSROOT_DIR="$HOME/.lambda-vm-sysroot"
158159
.github/scripts/run_recursion_bench.sh "$HEAD_SHA"

0 commit comments

Comments
 (0)