streaming: restore same-level refill; early admission on by default; fixed UE harness (L172)
Scheduler stable-sorts the whole level and checks capacity per admission (refill when slots free mid-pass); regression test with the old partial-sort path as negative control. Harness repoints Source/Standalone/uplugin together, records root HEAD/status, builds baselines from fresh worktrees, gates on DWARF struct sizes (480/480/480). Frame-resolution arrival: A/A p90 36.8 ms; fixed-on vs fixed-off -12.2 ms median (4/10 slower). 30 m/s: near 43.3 -> 55.3%, far holes 1.8 -> 0%, p99 <= 7.46 ms, worst <= 12.3 ms. Defaults: StreamingFastTravelWaitForAllCriticalTiles=0, StreamingFastTravelApplyBudgetMilliseconds=1.0, StreamingIncrementalDesiredSet=1, CoreRegionConcurrentAdmission=1, StreamingFastTravelForwardFirst=0, StreamingRebuildOnCoreRegionCompletion=1, StreamingCoreDesiredCacheByCenter=0, audits 0. Source/: VoxelWorld.cpp, VoxelStreamingAdmissionOrder.h (new). 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
9d088ef96c
commit
52cb3d7a23
7 files changed
+1149
-24
No files matched your search
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[4]
|
||||
SOURCE = ROOT / "Source/VoxelForge/Private/VoxelWorld.cpp"
|
||||
HEADER_DIR = ROOT / "Source/VoxelForge/Private"
|
||||
TEST_SOURCE = Path(__file__).with_name("TestStreamingAdmissionOrder.cpp")
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--out", type=Path, required=True)
|
||||
args = parser.parse_args()
|
||||
output = args.out.resolve()
|
||||
output.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
source = SOURCE.read_text(encoding="utf-8")
|
||||
required = (
|
||||
"VoxelStreamingAdmissionOrder::StableSortCandidates(",
|
||||
"LevelTiles.GetData(), LevelTiles.GetData() + LevelTiles.Num()",
|
||||
"VoxelStreamingAdmissionOrder::AdmitInOrder(LevelTiles",
|
||||
)
|
||||
if any(token not in source for token in required):
|
||||
raise SystemExit("VoxelWorld.cpp is not using the tested sort/admission helpers")
|
||||
if ("LevelSubmissionCount" in source or "LevelTiles.SetNum" in source
|
||||
or "std::partial_sort(" in source):
|
||||
raise SystemExit("pass-start truncation returned to the production scheduler")
|
||||
|
||||
compiler = os.environ.get("CXX") or shutil.which("clang++-19") or shutil.which("clang++")
|
||||
if not compiler:
|
||||
raise SystemExit("clang++ is required for the streaming admission regression")
|
||||
executable = output / "StreamingAdmissionOrderTest"
|
||||
build_log = output / "streaming-admission-order-build.log"
|
||||
run_log = output / "streaming-admission-order.log"
|
||||
command = [compiler, "-std=c++20", "-O1", "-Wall", "-Wextra", "-Werror",
|
||||
f"-I{HEADER_DIR}", str(TEST_SOURCE), "-o", str(executable)]
|
||||
built = subprocess.run(command, cwd=ROOT, text=True, capture_output=True, check=False)
|
||||
build_log.write_text(built.stdout + built.stderr, encoding="utf-8")
|
||||
if built.returncode != 0:
|
||||
raise SystemExit(f"admission regression compile failed; see {build_log}")
|
||||
ran = subprocess.run([str(executable)], cwd=ROOT, text=True, capture_output=True,
|
||||
check=False)
|
||||
run_log.write_text(ran.stdout + ran.stderr, encoding="utf-8")
|
||||
if ran.returncode != 0:
|
||||
raise SystemExit(f"admission regression failed; see {run_log}")
|
||||
print(ran.stdout.strip())
|
||||
print(f"[StreamingAdmissionOrder] production_source_guard=PASS build_log={build_log}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user