Files
VoxelForge/Standalone/Research/WorldAssemblerM3/Linux75/RunTimingPairsL75.py
T
Fr0zkaandClaude Opus 5.5 9d5455ec68 skip: passage proof bounds include wall/floor relief (L75 soundness fix); FI -7.6%
L74's passage bound omitted the 0.21 m wall relief and 0.20 m floor relief, so its whole-tile
proof was unsound in principle (no tested view hit it). Passage support is now bounded per route
segment by four parameter-subinterval boxes using Catmull-Rom derivative extrema, local max
radius and relief padding. Stratum slicing only at LOD0-2 in FI/VS. Legacy sub-tile block
certificates are audit-only (runtime version was slower). TN regression (-80,-20,-3218) kept.

Exact full-grid vs skip hashes on every tile, 4 views, Clang/GCC, W1/W8/W12; control caught;
80-camera sweep 0 violations. Whole view vs c67b200: SW -1.3%, FI -7.6%, TN -2.3%, VS +0.2%.
Compiles in the Linux UE host (VFHostEditor, 27/27 actions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
2026-10-27 14:34:49 +01:00

97 lines
4.2 KiB
Python

#!/usr/bin/env python3
"""Run three interleaved full-view pairs on committed L74 and current L75 builds."""
from __future__ import annotations
import json
import re
import statistics
import subprocess
import time
from pathlib import Path
ROOT = Path(__file__).resolve().parents[4]
OUT = ROOT / "Saved/Linux/l75/logs/timing"
DATA = ROOT / "Standalone/data/owner_world.json"
BINARIES = {
"before": ROOT / "Saved/Linux/l75/bin-c67-before/VoxelForgeCoreHeadless-l74-clang19",
"after": ROOT / "Saved/Linux/l75/bin/VoxelForgeCoreHeadless-l75-clang",
}
CAMERAS = {
0: (8.0, 16.0, -372.2626953125),
1: (25.8369140625, 3.19921875, -737.0),
2: (19.166015625, -14.2001953125, -753.3740234375),
3: (-20.0625, -5.068359375, -900.353515625),
}
ORDERS = (("before", "after"), ("after", "before"), ("before", "after"))
PIPELINE = re.compile(r"\[StreamPipeline\] (.*)")
PAIR = re.compile(r"([a-zA-Z0-9_]+)=([^ ]+)")
def run(strate: int, pair: int, mode: str) -> dict:
label = f"strate{strate}-pair{pair}-{mode}"
log = OUT / f"{label}.log"
camera = ",".join(f"{value:.12f}" for value in CAMERAS[strate]) + ",0,0"
command = [
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--", "timeout",
"1740s", str(BINARIES[mode]), str(DATA), "--world-assembler-prototype",
"--stream-benchmark", "--stream-pipeline", "--force-generate", "--workers=8",
"--clip-radius=3", "--max-clip-level=8", "--max-level=8", f"--camera={camera}",
]
started = time.monotonic()
with log.open("w", encoding="utf-8") as output:
result = subprocess.run(command, cwd=ROOT, stdout=output, stderr=subprocess.STDOUT,
check=False, timeout=1740)
content = log.read_text(encoding="utf-8", errors="replace")
match = PIPELINE.search(content)
if result.returncode != 0 or match is None:
raise SystemExit(f"timing run failed or missing StreamPipeline summary; see {log}")
pipeline = dict(PAIR.findall(match.group(1)))
row = {
"strate": strate, "pair": pair, "mode": mode, "exit_code": result.returncode,
"process_wall_s": round(time.monotonic() - started, 3),
"whole_view_ready_s": float(pipeline["whole_view_ready"].removesuffix("s")),
"stream_wall_s": float(pipeline["stream_wall"].removesuffix("s")),
"whole_tiles": int(pipeline["whole_tiles"].split("/")[0]),
"source_stamp": re.search(r"^\[VoxelForgeSourceStamp\] sha256=(\S+)$",
content, re.M),
"log": str(log.relative_to(ROOT)),
}
row["source_stamp"] = row["source_stamp"].group(1) if row["source_stamp"] else None
print("[L75TimingPairRun] " + json.dumps(row, sort_keys=True), flush=True)
return row
def main() -> int:
OUT.mkdir(parents=True, exist_ok=True)
missing = [str(path) for path in [DATA, *BINARIES.values()] if not path.is_file()]
if missing:
raise SystemExit("missing input: " + ", ".join(missing))
rows = []
for strate in range(4):
for pair, order in enumerate(ORDERS, 1):
for mode in order:
rows.append(run(strate, pair, mode))
summary = []
for strate in range(4):
group = [row for row in rows if row["strate"] == strate]
before = [row["whole_view_ready_s"] for row in group if row["mode"] == "before"]
after = [row["whole_view_ready_s"] for row in group if row["mode"] == "after"]
summary.append({"strate": strate, "pairs": len(before),
"before_s": [round(value, 3) for value in before],
"after_s": [round(value, 3) for value in after],
"before_median_s": round(statistics.median(before), 3),
"after_median_s": round(statistics.median(after), 3),
"change_pct": round(100.0 * (statistics.median(after)
/ statistics.median(before) - 1.0), 2)})
result = {"runs": rows, "summary": summary}
(OUT / "summary.json").write_text(json.dumps(result, indent=2) + "\n",
encoding="utf-8")
for row in summary:
print("[L75TimingPairSummary] " + json.dumps(row, sort_keys=True), flush=True)
return 0
if __name__ == "__main__":
raise SystemExit(main())