passages: two-pass swept-tube tunnels (owner design, L99, v215) - pending owner visual review
Route plan unchanged. Per tile, route segments whose bounded influence (tube + 4 m) touches the tile write min-combined tube distance (base sweep); relief/floor/mouth shaping only in the shell (detail sweep); 0.5 m edge blend into the strate field. Near-ready @W12: SW 1.01->0.80, FI 2.23->1.43, TN 2.18->1.37, VS 1.09->0.98 s; whole view FI 3.38->2.37 s. All passage walk audits pass (21,425/21,425 canonical, 3/3 interfaces); 24-run Clang/GCC W1/W8/W12 determinism; 0 sign flips. Change: mean 0.02 cm / 0.05 deg; max 25.9 cm (passage walls/roofs ~3.5 m from route, LOD2) and 49.8 deg (rock walls 13-25 m from routes, LOD2). Captures with diffs in Linux99/captures. Fast tier PASS (v215 pins). 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
36140b573f
commit
fa6363b31a
67 files changed
+2022
-45
No files matched your search
@@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Three interleaved L77 passage-share censuses for L98 and L99, all four strata."""
|
||||
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/l99/census"
|
||||
DATA = ROOT / "Standalone/data/owner_world.json"
|
||||
BINARIES = {
|
||||
"L98": ROOT / "Saved/Linux/l98/profile-post-bin/VoxelForgeCoreHeadless-l98-post-profile",
|
||||
"L99": ROOT / "Saved/Linux/l99/profile-bin/VoxelForgeCoreHeadless-l99-profile-clang",
|
||||
}
|
||||
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),
|
||||
}
|
||||
SAMPLE = re.compile(
|
||||
r"^\[L77Sample\] pc=(0x\w+) lod=(\d+) .*?phase=(\S+) .*?weight=(\d+)$", re.M)
|
||||
SAMPLER = re.compile(
|
||||
r"^\[L77Sampler\] action=stop .*?samples=(\d+).*?status=PASS$", re.M)
|
||||
|
||||
|
||||
def run(strate: str, label: str, rep: int) -> dict:
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
log = OUT / f"{label.lower()}-{strate.lower()}-r{rep}.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[label]), str(DATA),
|
||||
"--world-assembler-prototype", "--stream-benchmark", "--stream-pipeline",
|
||||
"--workers=8", "--clip-radius=3", "--max-clip-level=8", "--max-level=8",
|
||||
f"--camera={camera}", "--profile-lod-work", "--linux77-profile",
|
||||
]
|
||||
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")
|
||||
samples = [(int(lod), phase, int(weight))
|
||||
for _pc, lod, phase, weight in SAMPLE.findall(output)]
|
||||
sampler = SAMPLER.search(output)
|
||||
if result.returncode or not samples or sampler is None:
|
||||
raise RuntimeError(f"L77 census failed: exit={result.returncode} {log}")
|
||||
near = [row for row in samples if row[0] <= 2]
|
||||
passage = sum(weight for _, phase, weight in near if phase == "passages")
|
||||
total = sum(weight for _, _, weight in near)
|
||||
row = {
|
||||
"strate": strate, "binary": label, "replicate": rep,
|
||||
"exit_code": result.returncode, "wall_s": round(time.monotonic() - start, 3),
|
||||
"sampler_samples": int(sampler.group(1)), "near_lod_samples": len(near),
|
||||
"near_lod_weighted_ticks": total,
|
||||
"near_lod_passage_weighted_ticks": passage,
|
||||
"near_lod_passage_share_pct": 100.0 * passage / total,
|
||||
"log": str(log.relative_to(ROOT)),
|
||||
}
|
||||
print("[L99CensusRun] " + json.dumps(row, sort_keys=True), flush=True)
|
||||
return row
|
||||
|
||||
|
||||
def main() -> int:
|
||||
for binary in (*BINARIES.values(), DATA):
|
||||
if not binary.is_file():
|
||||
raise SystemExit(f"missing input: {binary}")
|
||||
rows = []
|
||||
orders = (("L98", "L99"), ("L99", "L98"), ("L98", "L99"))
|
||||
for rep, order in enumerate(orders, 1):
|
||||
for label in order:
|
||||
for strate in CAMERAS:
|
||||
rows.append(run(strate, label, rep))
|
||||
(OUT / "runs-partial.json").write_text(json.dumps(rows, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
summary = []
|
||||
for strate in CAMERAS:
|
||||
item = {"strate": strate, "pairs": 3}
|
||||
for label in BINARIES:
|
||||
subset = [row for row in rows if row["strate"] == strate
|
||||
and row["binary"] == label]
|
||||
values = [row["near_lod_passage_share_pct"] for row in subset]
|
||||
item[f"{label}_runs_pct"] = values
|
||||
item[f"{label}_mean_pct"] = statistics.mean(values)
|
||||
item["change_pp"] = item["L99_mean_pct"] - item["L98_mean_pct"]
|
||||
summary.append(item)
|
||||
(OUT / "summary.json").write_text(json.dumps(
|
||||
{"runs": rows, "near_lod_passage_share": summary}, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user