diag: bounded passage carve reach rejected (L93); R43 Unreal SW startup notes
Explicit carve reach R (diagnostic, default unbounded): R=2.5 m -> 1.56 cm max displacement, 106 deg max normal change; R=4 m -> 0.63 cm but 53 deg normals. Fails the bar; readiness gain small and inconsistent (TN -5%, VS +6-7%). No world change (v214). Fast tier PASS. R43: Unreal SW bReady 2.16 s = serial sign-edge repair (1.94 s, 10.9M corrections; parallelSignEdgeRepair exists but off); ~0.45 s of SerializeResolvedWorld = adapter SW route search. 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
70c37aaab3
commit
1e111cc042
9 files changed
+545
-55
No files matched your search
@@ -0,0 +1,139 @@
|
||||
#!/usr/bin/env python3
|
||||
"""L80-style cold near-readiness A/B for the bounded carve and L81 reach skip."""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import re
|
||||
import statistics
|
||||
import subprocess
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[4]
|
||||
OUT = ROOT / "Saved/Linux/l93/readiness"
|
||||
DATA = ROOT / "Standalone/data/owner_world.json"
|
||||
BINARY = ROOT / "Saved/Linux/l93/bin/VoxelForgeCoreHeadless-clang19"
|
||||
STRATA = {
|
||||
"S0": {"id": 0, "camera": (8.0, 16.0, -372.2626953125), "near": 1408},
|
||||
"FI": {"id": 1, "camera": (25.8369140625, 3.19921875, -737.0), "near": 1216},
|
||||
"TN": {"id": 2, "camera": (19.166015625, -14.2001953125, -753.3740234375), "near": 1344},
|
||||
"S3": {"id": 3, "camera": (-20.0625, -5.068359375, -900.353515625), "near": 1344},
|
||||
}
|
||||
MODES = {"unbounded": "0", "bounded": "2.5"}
|
||||
PIPELINE = re.compile(r"^\[StreamPipeline\] (.*)$", re.M)
|
||||
NEAR = re.compile(r"^\[WorldAssemblerNearLODReady\] lods=0-2 tiles=(\d+)/(\d+) "
|
||||
r"cold_ready_s=([0-9.]+)$", re.M)
|
||||
PROFILE = re.compile(r"^\[PassageComposerTile\] key=\((-?\d+),(-?\d+),(-?\d+),lod(\d+)\) (.*)$", re.M)
|
||||
FIELDS = re.compile(r"([a-zA-Z0-9_]+)=([^ ]+)")
|
||||
WORK_FIELDS = (
|
||||
"samples", "queries", "passage_iterations", "tile_bound_checks",
|
||||
"tile_bound_rejects", "tile_bound_skipped_iterations", "negative_bounds",
|
||||
"negative_rejects", "positive_bounds", "positive_rejects",
|
||||
"carve_segment_visits", "support_segment_visits", "support_capsule_checks",
|
||||
"later_bore_checks", "other_capsule_checks", "mouth_route_segment_checks",
|
||||
"relief_field_calls", "smoothstep_evaluations",
|
||||
)
|
||||
|
||||
|
||||
def parse_fields(line: str) -> dict[str, str]:
|
||||
return dict(FIELDS.findall(line))
|
||||
|
||||
|
||||
def run(stratum: str, workers: int, mode: str, phase: str, replicate: int) -> dict:
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
spec = STRATA[stratum]
|
||||
label = f"{stratum.lower()}-w{workers}-{mode}-{phase}{replicate}"
|
||||
log = OUT / f"{label}.log"
|
||||
camera = ",".join(f"{value:.12f}" for value in spec["camera"]) + ",0,0"
|
||||
command = [
|
||||
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--", "env",
|
||||
f"VOXELFORGE_L93_PASSAGE_CARVE_REACH_METRES={MODES[mode]}",
|
||||
"VOXELFORGE_L81_PASSAGE_BOUND_PADDING_VOXELS=0", "timeout", "1740s",
|
||||
str(BINARY), 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", "--profile-passage-composer",
|
||||
"--stream-scheduler-policy=3",
|
||||
]
|
||||
start = time.monotonic()
|
||||
try:
|
||||
with log.open("w", encoding="utf-8") as stream:
|
||||
proc = subprocess.run(command, cwd=ROOT, stdout=stream,
|
||||
stderr=subprocess.STDOUT, check=False, timeout=1750)
|
||||
except subprocess.TimeoutExpired as exc:
|
||||
raise RuntimeError(f"readiness run exceeded 1,750 seconds: {log}") from exc
|
||||
output = log.read_text(encoding="utf-8", errors="replace")
|
||||
near = NEAR.search(output)
|
||||
pipeline = PIPELINE.search(output)
|
||||
if proc.returncode or near is None or pipeline is None:
|
||||
raise RuntimeError(f"readiness run failed or required output missing: {log}; exit={proc.returncode}")
|
||||
pipeline_fields = parse_fields(pipeline.group(1))
|
||||
by_key: dict[tuple[int, int, int, int], dict[str, int]] = {}
|
||||
for match in PROFILE.finditer(output):
|
||||
key = tuple(int(value) for value in match.groups()[:4])
|
||||
if key[3] > 2:
|
||||
continue
|
||||
fields = parse_fields(match.group(5))
|
||||
by_key[key] = {name: int(fields.get(name, "0")) for name in WORK_FIELDS}
|
||||
work = {name: sum(values[name] for values in by_key.values()) for name in WORK_FIELDS}
|
||||
expected = spec["near"]
|
||||
row = {
|
||||
"stratum": stratum, "workers": workers, "mode": mode,
|
||||
"phase": phase, "replicate": replicate, "exit_code": proc.returncode,
|
||||
"wall_s": round(time.monotonic() - start, 3),
|
||||
"lod02_ready_s": float(near.group(3)),
|
||||
"near_tiles": f"{near.group(1)}/{near.group(2)}",
|
||||
"expected_near_tiles": expected,
|
||||
"profiled_near_tiles": len(by_key),
|
||||
"unprofiled_near_tiles": max(0, expected - len(by_key)),
|
||||
"whole_view_ready_s": float(pipeline_fields["whole_view_ready"].removesuffix("s")),
|
||||
"whole_tiles": int(pipeline_fields["whole_tiles"].split("/")[0]),
|
||||
"work": work,
|
||||
"log": str(log.relative_to(ROOT)),
|
||||
}
|
||||
print("[L93BoundedReadinessRun] " + json.dumps(row, sort_keys=True), flush=True)
|
||||
return row
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--stratum", choices=tuple(STRATA), required=True)
|
||||
parser.add_argument("--workers", choices=(8, 12), type=int, required=True)
|
||||
args = parser.parse_args()
|
||||
if not BINARY.is_file() or not DATA.is_file():
|
||||
raise SystemExit(f"missing input: {BINARY} or {DATA}")
|
||||
rows = []
|
||||
for mode in MODES:
|
||||
run(args.stratum, args.workers, mode, "warmup", 0)
|
||||
orders = (("unbounded", "bounded"), ("bounded", "unbounded"),
|
||||
("unbounded", "bounded"))
|
||||
for replicate, order in enumerate(orders, 1):
|
||||
for mode in order:
|
||||
rows.append(run(args.stratum, args.workers, mode, "measured", replicate))
|
||||
(OUT / f"runs-partial-{args.stratum.lower()}-w{args.workers}.json").write_text(
|
||||
json.dumps(rows, indent=2) + "\n", encoding="utf-8")
|
||||
summary = {"stratum": args.stratum, "workers": args.workers,
|
||||
"measured_pairs": 3, "runs": rows}
|
||||
for mode in MODES:
|
||||
subset = [row for row in rows if row["mode"] == mode]
|
||||
summary[f"{mode}_lod02_ready_s"] = [row["lod02_ready_s"] for row in subset]
|
||||
summary[f"{mode}_lod02_ready_median_s"] = statistics.median(
|
||||
row["lod02_ready_s"] for row in subset)
|
||||
summary[f"{mode}_whole_ready_s"] = [row["whole_view_ready_s"] for row in subset]
|
||||
summary[f"{mode}_whole_ready_median_s"] = statistics.median(
|
||||
row["whole_view_ready_s"] for row in subset)
|
||||
summary[f"{mode}_work_median"] = {
|
||||
name: statistics.median(row["work"][name] for row in subset)
|
||||
for name in WORK_FIELDS}
|
||||
path = OUT / f"summary-{args.stratum.lower()}-w{args.workers}.json"
|
||||
path.write_text(json.dumps(summary, indent=2) + "\n", encoding="utf-8")
|
||||
print("[L93BoundedReadinessSummary] " + json.dumps(summary, sort_keys=True), flush=True)
|
||||
valid = all(row["near_tiles"].split("/") == [str(row["expected_near_tiles"])] * 2
|
||||
and 0 < row["profiled_near_tiles"] <= row["expected_near_tiles"]
|
||||
for row in rows)
|
||||
return 0 if valid else 14
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user