passages: swept tube evaluates the exact route on in-bound cache misses (L100, v216)
L99 treated a missing exact-grid sweep sample as "no route here", so off-grid queries exposed the FI/TN boundary band inside passage 1-2 (flat ceiling/floor). In-bound misses now evaluate the exact route; a conservative route-feature bound still skips out-of-extent misses. Composition order unchanged (graph -> bands -> passage -> stamps -> floor caps). Comparison now counts added/removed crossings and triangles: 0/0 crossings on all four strates (FI +56 triangles). 1-2 mid-tunnel: L98->L100 changes 32k px (L99 changed 1.14M). Near-ready @W12 (L98/L99/L100): FI 2.62/1.78/2.05, TN 2.36/1.55/1.80, SW 1.17/0.95/1.04, VS 1.16/1.03/1.08 s. All walk audits pass; 24/24 Clang/GCC W1/W8/W12 determinism; fast tier PASS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
1 parent
fa6363b31a
commit
2d5822cdf7
47 files changed
+1433
-22
No files matched your search
@@ -0,0 +1,115 @@
|
||||
#!/usr/bin/env python3
|
||||
"""L80 cold-readiness protocol: three interleaved L98/L99 pairs at W8 and W12."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
import statistics
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[4]
|
||||
OUT_ROOT = ROOT / "Saved/Linux/l100/readiness"
|
||||
DATA = ROOT / "Standalone/data/owner_world.json"
|
||||
ALL_BINARIES = {
|
||||
"L98": ROOT / "Saved/Linux/l98/bin/VoxelForgeCoreHeadless-l98-clang19",
|
||||
"L99": ROOT / "Saved/Linux/l99/bin/VoxelForgeCoreHeadless-l99-clang",
|
||||
"L100": ROOT / "Saved/Linux/l100/bin/VoxelForgeCoreHeadless-l100-clang",
|
||||
}
|
||||
OUT = OUT_ROOT
|
||||
BINARIES = {}
|
||||
# Resolved owner camera index -> stratum. Keep the labels tied to the canonical layout.
|
||||
CAMERAS = {
|
||||
"SW": (8.0, 16.0, -372.2626953125),
|
||||
"FI": (25.8369140625, 3.19921875, -737.0),
|
||||
"TN": (19.166015625, -14.2001953125, -753.3740234375),
|
||||
"VS": (-20.0625, -5.068359375, -900.353515625),
|
||||
}
|
||||
PIPELINE = re.compile(r"^\[StreamPipeline\] (.*)$", re.M)
|
||||
FIELDS = re.compile(r"([a-zA-Z0-9_]+)=([^ ]+)")
|
||||
NEAR = re.compile(r"^\[WorldAssemblerNearLODReady\] lods=0-2 tiles=(\d+)/(\d+) "
|
||||
r"cold_ready_s=([0-9.]+)$", re.M)
|
||||
|
||||
|
||||
def run(strate: str, workers: int, label: str, phase: str, rep: int) -> dict:
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
log = OUT / f"w{workers}-{strate.lower()}-{label.lower()}-{phase}{rep}.log"
|
||||
camera = ",".join(f"{v:.12f}" for v in CAMERAS[strate]) + ",0,0"
|
||||
command = [
|
||||
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--",
|
||||
"env", "timeout", "1740s", str(BINARIES[label]), str(DATA),
|
||||
"--world-assembler-prototype", "--stream-benchmark", "--stream-pipeline",
|
||||
f"--workers={workers}", "--clip-radius=3", "--max-clip-level=8",
|
||||
"--max-level=8", f"--camera={camera}", "--profile-lod-work",
|
||||
"--stream-scheduler-policy=3",
|
||||
]
|
||||
start = time.monotonic()
|
||||
with log.open("w", encoding="utf-8") as stream:
|
||||
result = subprocess.run(command, cwd=ROOT, stdout=stream,
|
||||
stderr=subprocess.STDOUT, check=False, timeout=1740)
|
||||
output = log.read_text(encoding="utf-8", errors="replace")
|
||||
pipeline_match, near_match = PIPELINE.search(output), NEAR.search(output)
|
||||
if result.returncode or pipeline_match is None or near_match is None:
|
||||
raise RuntimeError(f"readiness run failed: exit={result.returncode} {log}")
|
||||
pipeline = dict(FIELDS.findall(pipeline_match.group(1)))
|
||||
row = {
|
||||
"strate": strate, "workers": workers, "binary": label, "phase": phase,
|
||||
"replicate": rep, "exit_code": result.returncode,
|
||||
"wall_s": round(time.monotonic() - start, 3),
|
||||
"lod02_tiles": f"{near_match.group(1)}/{near_match.group(2)}",
|
||||
"lod02_ready_s": float(near_match.group(3)),
|
||||
"whole_view_ready_s": float(pipeline["whole_view_ready"].removesuffix("s")),
|
||||
"whole_tiles": pipeline["whole_tiles"].split("/")[0],
|
||||
"log": str(log.relative_to(ROOT)),
|
||||
}
|
||||
print("[L100ReadinessRun] " + json.dumps(row, sort_keys=True), flush=True)
|
||||
return row
|
||||
|
||||
|
||||
def main() -> int:
|
||||
global BINARIES, OUT
|
||||
pair = sys.argv[1:] or ["L98", "L100"]
|
||||
if len(pair) != 2 or len(set(pair)) != 2 or any(item not in ALL_BINARIES for item in pair):
|
||||
raise SystemExit("usage: RunL100Readiness.py L98 L100 | L99 L100")
|
||||
BINARIES = {label: ALL_BINARIES[label] for label in pair}
|
||||
OUT = OUT_ROOT / f"{pair[0].lower()}-{pair[1].lower()}"
|
||||
for binary in (*BINARIES.values(), DATA):
|
||||
if not binary.is_file():
|
||||
raise SystemExit(f"missing input: {binary}")
|
||||
rows = []
|
||||
first, second = tuple(BINARIES)
|
||||
orders = ((first, second), (second, first), (first, second))
|
||||
for workers in (8, 12):
|
||||
for strate in CAMERAS:
|
||||
for label in BINARIES:
|
||||
run(strate, workers, label, "warmup", 0)
|
||||
for strate in CAMERAS:
|
||||
for rep, order in enumerate(orders, 1):
|
||||
for label in order:
|
||||
rows.append(run(strate, workers, label, "measured", rep))
|
||||
(OUT / "runs-partial.json").write_text(json.dumps(rows, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
summary = []
|
||||
for workers in (8, 12):
|
||||
for strate in CAMERAS:
|
||||
group = [row for row in rows
|
||||
if row["workers"] == workers and row["strate"] == strate]
|
||||
item = {"workers": workers, "strate": strate, "measured_pairs": 3}
|
||||
for label in BINARIES:
|
||||
subset = [row for row in group if row["binary"] == label]
|
||||
for metric in ("lod02_ready_s", "whole_view_ready_s"):
|
||||
values = [row[metric] for row in subset]
|
||||
item[f"{label}_{metric}_runs"] = values
|
||||
item[f"{label}_{metric}_median"] = statistics.median(values)
|
||||
item[f"{label}_process_wall_s_runs"] = [row["wall_s"] for row in subset]
|
||||
summary.append(item)
|
||||
(OUT / "summary.json").write_text(json.dumps(
|
||||
{"comparison_pair": pair, "runs": rows, "summary": summary}, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user