The FI->TN wall beat (4.77 cm at 7.06 m) was the lower-mouth flare: the full mouth radius was assigned to the penultimate control point, a one-segment radius jump. The shared route builder now blends to the mouth radius over 12 m with a smoothstep. Wall ripple 1-2: 7.27 -> 1.62 cm. All three passages pass support/blocked/grade/ripple/naturalness; controls detected. Fast tier 269/269 incl. the new-plan stage; W1/W8/W12 equal, Clang and GCC. Hash pins: FI style 2 re-pinned at v213. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
106 lines
4.4 KiB
Python
106 lines
4.4 KiB
Python
#!/usr/bin/env python3
|
|
"""Measure three interleaved L67/L68 whole-view pairs per owner strate."""
|
|
import json
|
|
import os
|
|
import re
|
|
import subprocess
|
|
import time
|
|
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[4]
|
|
OUT = ROOT / "Saved/Linux/l68/cost"
|
|
DATA = ROOT / "Standalone/data/owner_world.json"
|
|
BINARIES = {
|
|
"l67": ROOT / "Saved/Linux/l67/bin-final/VoxelForgeCoreHeadless-l67-final-clang",
|
|
"l68": ROOT / "Saved/Linux/l68/bin-final-clang/VoxelForgeCoreHeadless-l68-final-clang",
|
|
}
|
|
CAMERAS = {
|
|
0: "0.000000,0.000000,-374.939453,0.000000,0.000000",
|
|
1: "25.836914,3.199219,-737.000000,0.000000,0.000000",
|
|
2: "19.166016,-14.200195,-753.374023,0.000000,0.000000",
|
|
3: "-20.062500,-5.068359,-900.353516,0.000000,0.000000",
|
|
}
|
|
ORDER = ("l67", "l68", "l68", "l67", "l67", "l68")
|
|
PREFIXES = (
|
|
"[PipelineFullDetailHash]", "[PipelineWholeViewHash]",
|
|
"[PipelineLODHash]", "[PipelineExactQueryHash]",
|
|
)
|
|
ELAPSED_RE = re.compile(r"\belapsed_ms=([0-9.]+)")
|
|
WHOLE_VIEW_RE = re.compile(r"^\[StreamPipeline\].*?whole_view_ready=([0-9.]+)s", re.M)
|
|
ENV = os.environ.copy()
|
|
|
|
|
|
def run(strate, repetition, variant):
|
|
name = f"strate{strate}-pair{repetition // 2 + 1}-{variant}"
|
|
log_path = OUT / f"{name}.log"
|
|
layout_path = OUT / f"{name}.json"
|
|
command = [
|
|
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--",
|
|
"timeout", "1740s", str(BINARIES[variant]), str(DATA), "--workers=1",
|
|
"--world-assembler-prototype", "--stream-benchmark", "--stream-pipeline",
|
|
"--force-generate", "--clip-radius=1", "--max-clip-level=8", "--max-level=0",
|
|
"--recipe=surface-world", "--stream-hash", "--max-clip-level=0",
|
|
"--render-distance-chunks=0", f"--camera={CAMERAS[strate]}",
|
|
f"--resolved-layout-output={layout_path}",
|
|
]
|
|
start = time.monotonic()
|
|
with log_path.open("w", encoding="utf-8") as stream:
|
|
result = subprocess.run(command, cwd=ROOT, env=ENV, stdout=stream,
|
|
stderr=subprocess.STDOUT, timeout=1740, check=False)
|
|
elapsed = time.monotonic() - start
|
|
lines = log_path.read_text(encoding="utf-8", errors="replace").splitlines()
|
|
hashes = [line for line in lines if line.startswith(PREFIXES)]
|
|
pipeline_elapsed = [float(value) for line in lines
|
|
if line.startswith("[PipelineWholeViewHash]")
|
|
for value in ELAPSED_RE.findall(line)]
|
|
whole_view_match = WHOLE_VIEW_RE.search("\n".join(lines))
|
|
record = {
|
|
"strate": strate, "pair_order": repetition, "variant": variant,
|
|
"elapsed_seconds": elapsed, "pipeline_elapsed_ms": pipeline_elapsed,
|
|
"whole_view_seconds": float(whole_view_match.group(1))
|
|
if whole_view_match else None,
|
|
"exit_code": result.returncode, "hash_rows": len(hashes),
|
|
"log": str(log_path.relative_to(ROOT)),
|
|
}
|
|
print(json.dumps(record, sort_keys=True), flush=True)
|
|
return record
|
|
|
|
|
|
def main():
|
|
OUT.mkdir(parents=True, exist_ok=True)
|
|
results = []
|
|
for strate in range(4):
|
|
for repetition, variant in enumerate(ORDER):
|
|
record = run(strate, repetition, variant)
|
|
results.append(record)
|
|
if record["exit_code"] != 0 or record["hash_rows"] != 12:
|
|
break
|
|
else:
|
|
continue
|
|
break
|
|
strata = {}
|
|
for strate in range(4):
|
|
values = {variant: [row["whole_view_seconds"] for row in results
|
|
if row["strate"] == strate and row["variant"] == variant
|
|
and row["whole_view_seconds"] is not None]
|
|
for variant in ("l67", "l68")}
|
|
if all(len(values[variant]) == 3 for variant in ("l67", "l68")):
|
|
l67 = sorted(values["l67"])[1]
|
|
l68 = sorted(values["l68"])[1]
|
|
strata[str(strate)] = {"l67_seconds": values["l67"],
|
|
"l68_seconds": values["l68"], "l67_median_seconds": l67,
|
|
"l68_median_seconds": l68,
|
|
"change_percent": (l68 / l67 - 1.0) * 100.0}
|
|
summary = {"pairs_per_strate": 3, "order": ORDER, "strata": strata,
|
|
"runs": results, "complete": len(results) == 24
|
|
and all(x["exit_code"] == 0 and x["hash_rows"] == 12 for x in results)}
|
|
(OUT / "cost-summary.json").write_text(json.dumps(summary, indent=2) + "\n",
|
|
encoding="utf-8")
|
|
print(f"[L68CostSummary] complete={summary['complete']} runs={len(results)}", flush=True)
|
|
return 0 if summary["complete"] else 1
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|