passages: exact relief skip + per-tile BVH node masks (L82); FI/TN LOD0-2 -12%
- Wall relief noise is skipped when its hard-bounded contribution cannot change the final max; mouth surface/tread noise only on paths that use it. - Exact active BVH-node masks cached per tile/passage/segment range; no per-sample lower_bound. - Full-view audit imports the exported Core plan (not the stale 26-point root route): 21,425/21,425 walkability samples pass. Cold (L80 protocol, medians) LOD0-2: SW 1.16->1.11, FI 2.86->2.51, TN 2.88->2.54, VS 1.23->1.22 s. Passage share FI 64.6->58.7%, TN 65.4->58.4%. Hashes identical (v214). TN "slowdown" from L81 not reproduced (5 pairs, 3.08 -> 2.75 s). Fast tier PASS; Linux UE host builds. 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
9cb5e53b17
commit
f572108dc4
10 files changed
+665
-41
No files matched your search
@@ -0,0 +1,114 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Five interleaved TN LOD0-2 readiness pairs: 90378a5 vs 9cb5e53."""
|
||||
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/l82/tn-regression"
|
||||
DATA = ROOT / "Standalone/data/owner_world.json"
|
||||
BINARIES = {
|
||||
"90378a5": ROOT / "Saved/Linux/l76/verify/bin/VoxelForgeCoreHeadless-verify-clang",
|
||||
"9cb5e53": ROOT / "Saved/Linux/l81/bin/VoxelForgeCoreHeadless-l81-clang",
|
||||
}
|
||||
CAMERA = (19.166015625, -14.2001953125, -753.3740234375)
|
||||
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(version: str, rep: int) -> dict:
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
log = OUT / f"{version}-r{rep}.log"
|
||||
camera = ",".join(f"{v:.12f}" for v in CAMERA) + ",0,0"
|
||||
command = [
|
||||
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--",
|
||||
"env", "VOXELFORGE_L81_PASSAGE_BOUND_PADDING_VOXELS=0", "timeout", "1740s",
|
||||
str(BINARIES[version]), str(DATA), "--world-assembler-prototype",
|
||||
"--stream-benchmark", "--stream-pipeline", "--workers=8", "--clip-radius=3",
|
||||
"--max-clip-level=8", "--max-level=2", f"--camera={camera}",
|
||||
"--profile-lod-work",
|
||||
]
|
||||
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:
|
||||
raise RuntimeError(f"TN run failed: exit={result.returncode} {log}")
|
||||
pipeline = dict(FIELDS.findall(pipeline_match.group(1)))
|
||||
whole_tiles = int(pipeline["whole_tiles"].split("/")[0])
|
||||
if near_match is not None:
|
||||
lod02_ready_s = float(near_match.group(3))
|
||||
lod02_tiles = int(near_match.group(1))
|
||||
else:
|
||||
# 90378a5 predates the explicit near-LOD milestone. With max-level=2,
|
||||
# the complete 0-2 view is the whole-view milestone.
|
||||
lod02_ready_s = float(pipeline["whole_view_ready"].removesuffix("s"))
|
||||
lod02_tiles = whole_tiles
|
||||
if lod02_tiles != 1344 or whole_tiles != 1344:
|
||||
raise RuntimeError(f"TN tile scope mismatch: lod02={lod02_tiles} whole={whole_tiles} {log}")
|
||||
row = {
|
||||
"version": version, "pair": rep, "exit_code": result.returncode,
|
||||
"wall_s": round(time.monotonic() - start, 3),
|
||||
"lod02_ready_s": lod02_ready_s,
|
||||
"whole_view_ready_s": float(pipeline["whole_view_ready"].removesuffix("s")),
|
||||
"whole_tiles": whole_tiles,
|
||||
"log": str(log.relative_to(ROOT)),
|
||||
}
|
||||
print("[L82TNRegressionRun] " + json.dumps(row, sort_keys=True), flush=True)
|
||||
return row
|
||||
|
||||
|
||||
def main() -> int:
|
||||
for path in (*BINARIES.values(), DATA):
|
||||
if not path.is_file():
|
||||
raise SystemExit(f"missing input: {path}")
|
||||
rows = []
|
||||
for rep in range(1, 6):
|
||||
order = ("90378a5", "9cb5e53") if rep % 2 else ("9cb5e53", "90378a5")
|
||||
for version in order:
|
||||
rows.append(run(version, rep))
|
||||
(OUT / "runs-partial.json").write_text(json.dumps(rows, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
by_pair = {rep: {row["version"]: row for row in rows if row["pair"] == rep}
|
||||
for rep in range(1, 6)}
|
||||
paired_ready_delta = [by_pair[rep]["9cb5e53"]["lod02_ready_s"]
|
||||
- by_pair[rep]["90378a5"]["lod02_ready_s"]
|
||||
for rep in range(1, 6)]
|
||||
paired_whole_delta = [by_pair[rep]["9cb5e53"]["whole_view_ready_s"]
|
||||
- by_pair[rep]["90378a5"]["whole_view_ready_s"]
|
||||
for rep in range(1, 6)]
|
||||
summary = {
|
||||
"pairs": 5,
|
||||
"90378a5_lod02_median_s": statistics.median(
|
||||
row["lod02_ready_s"] for row in rows if row["version"] == "90378a5"),
|
||||
"9cb5e53_lod02_median_s": statistics.median(
|
||||
row["lod02_ready_s"] for row in rows if row["version"] == "9cb5e53"),
|
||||
"paired_lod02_delta_s": paired_ready_delta,
|
||||
"paired_lod02_delta_median_s": statistics.median(paired_ready_delta),
|
||||
"90378a5_whole_median_s": statistics.median(
|
||||
row["whole_view_ready_s"] for row in rows if row["version"] == "90378a5"),
|
||||
"9cb5e53_whole_median_s": statistics.median(
|
||||
row["whole_view_ready_s"] for row in rows if row["version"] == "9cb5e53"),
|
||||
"paired_whole_delta_s": paired_whole_delta,
|
||||
"paired_whole_delta_median_s": statistics.median(paired_whole_delta),
|
||||
"scheduling": "both binaries used their default scheduler settings; 90378a5 predates the policy flag",
|
||||
"runs": rows,
|
||||
}
|
||||
(OUT / "summary.json").write_text(json.dumps(summary, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
print("[L82TNRegressionSummary] " + json.dumps(
|
||||
{k: v for k, v in summary.items() if k != "runs"}, sort_keys=True), flush=True)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user