streaming: split dense passage-junction grid fills; heavy-first order + far-parent deferral in Unreal (L85)

Tiles with passage-overlap score >= 9 split grid fill over up to 4 helper lanes (disjoint rows,
same per-sample order, join before MC) when workers are idle. FI junction tile fill 173 -> 99 ms;
estimated serial floor ~0.55-0.60 s. Readiness essentially unchanged (FI/TN LOD0-2 ~2.15 s @W12):
the limit is now aggregate work, not single tiles.
Unreal: LOD0-2 ordered by passage overlap before travel/distance (L80 modes kept); far parents
built after LOD0-1, LOD2 gated on them; helper budget via ParallelFor. Unreal null-RHI FI
arrival: LOD0-2 resident at 3.65 s.
All tile hashes identical to L84 (four whole views). 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:
Fr0zkaandClaude Opus 5.5 committed 2026-10-28 02:02:32 +01:00
1 parent 0a98da6fd0
commit 06f558dc91
17 files changed
+1561 -54

No files matched your search

@@ -0,0 +1,112 @@
#!/usr/bin/env python3
"""L80-protocol W8/W12 readiness pairs for the L85 split-grid candidate."""
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/l85/scaling-final"
DATA = ROOT / "Standalone/data/owner_world.json"
BINARY = ROOT / "Saved/Linux/l85/bin/VoxelForgeCoreHeadless-clang19"
WORKERS = (8, 12)
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),
}
EXPECTED_NEAR = {0: 1408, 1: 1216, 2: 1344, 3: 1344}
EXPECTED_WHOLE = {0: 2850, 1: 2249, 2: 2233, 3: 2329}
SOURCE_STAMP = "2967bb8aaea5a7beac0cd0735c0c2e5cccd7b31a9622dd33395e81ff1e5f2589"
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+) cold_ready_s=([0-9.]+)$", re.M)
STAMP = re.compile(r"^\[VoxelForgeSourceStamp\] sha256=(\S+)$", re.M)
def run(strate: int, workers: int, phase: str, rep: int) -> dict:
OUT.mkdir(parents=True, exist_ok=True)
log = OUT / f"s{strate}-w{workers}-{phase}{rep}.log"
camera = ",".join(f"{v:.12f}" for v in CAMERAS[strate]) + ",0,0"
command = [
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--",
"env", "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", "--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, stamp_match = (
PIPELINE.search(output), NEAR.search(output), STAMP.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}")
if stamp_match is None or stamp_match.group(1) != SOURCE_STAMP:
raise RuntimeError(f"source stamp mismatch in {log}")
pipeline = dict(FIELDS.findall(pipeline_match.group(1)))
near_done, near_total = int(near_match.group(1)), int(near_match.group(2))
whole_done, whole_total = (int(v) for v in pipeline["whole_tiles"].split("/"))
if (near_done, near_total) != (EXPECTED_NEAR[strate], EXPECTED_NEAR[strate]):
raise RuntimeError(f"near readiness incomplete in {log}: {near_done}/{near_total}")
if (whole_done, whole_total) != (EXPECTED_WHOLE[strate], EXPECTED_WHOLE[strate]):
raise RuntimeError(f"whole readiness incomplete in {log}: {whole_done}/{whole_total}")
row = {
"strate": strate, "workers": workers, "phase": phase, "replicate": rep,
"exit_code": result.returncode, "wall_s": round(time.monotonic() - start, 3),
"lod02_ready_s": float(near_match.group(3)),
"whole_view_ready_s": float(pipeline["whole_view_ready"].removesuffix("s")),
"shape_s": float(pipeline["shape"].removesuffix("s")),
"far_shape_s": float(pipeline["far_shape"].removesuffix("s")),
"first_tile_ready_s": float(pipeline["first_tile_ready"].removesuffix("s")),
"neighborhood_ready_s": float(pipeline["neighborhood_ready"].removesuffix("s")),
"full_detail_ready_s": float(pipeline["full_detail_ready"].removesuffix("s")),
"near_tiles": near_total, "whole_tiles": whole_total,
"source_stamp": stamp_match.group(1), "log": str(log.relative_to(ROOT)),
}
print("[L85ScalingRun] " + json.dumps(row, sort_keys=True), flush=True)
return row
def main() -> int:
if not BINARY.is_file() or not DATA.is_file():
raise SystemExit(f"missing input: {BINARY} or {DATA}")
rows = []
for strate in range(4):
for workers in WORKERS:
run(strate, workers, "warmup", 0)
for rep, order in enumerate(((8, 12), (12, 8), (8, 12)), 1):
for workers in order:
rows.append(run(strate, workers, "measured", rep))
(OUT / "runs-partial.json").write_text(
json.dumps(rows, indent=2) + "\n", encoding="utf-8")
summary = []
for strate in range(4):
for workers in WORKERS:
subset = [row for row in rows
if row["strate"] == strate and row["workers"] == workers]
item = {"strate": strate, "workers": workers, "measured_runs": len(subset)}
for metric in ("lod02_ready_s", "whole_view_ready_s", "shape_s", "far_shape_s",
"first_tile_ready_s", "neighborhood_ready_s", "full_detail_ready_s"):
values = [row[metric] for row in subset]
item[metric] = values
item[f"{metric}_median"] = statistics.median(values)
item[f"{metric}_min"] = min(values)
item[f"{metric}_max"] = max(values)
summary.append(item)
(OUT / "summary.json").write_text(
json.dumps({"runs": rows, "summary": summary}, indent=2) + "\n",
encoding="utf-8")
return 0
if __name__ == "__main__":
raise SystemExit(main())