perf(core): tile-drain instrumentation; parallel FI sign-edge repair, FI first tile 1.28 -> 0.85 s (L55); R24

Opt-in --instrument-tile-drain records per-tile queue/dispatch/finish timelines, stage spans and counters
(proof skips, X8 lanes, GradAt/midpoint memo, skirts, FI cache stats); <2% when off. Measured: SW 13.3 and
FI 50.2 worker-s across LOD0-8, tails are work-saturated. FI sign-edge repair now computes in parallel and
publishes in sorted serial order (exact output): sign-edge 535 -> 47 ms, FI first tile 1.28 -> 0.85 s, near
ring 1.46 -> 1.04 s, whole view 6.09 -> 5.65 s. Proof block size, lane batching, SW midpoint memo and helper
cap 12 measured and left off. fast/medium/full PASS, Clang and GCC. Research R24: slab + motif generator.

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-25 06:16:07 +01:00
1 parent e35a77f676
commit aee1487410
13 files changed
+882 -74

No files matched your search

@@ -0,0 +1,101 @@
# L55 Linux report
## Result
Added opt-in headless tile-drain instrumentation and measured the requested kernel A/Bs. The only enabled speed cut is deterministic parallel FI sign-edge repair. It preserves the serial output hashes. Helper cap remains 8; proof size, active-lane batching, and SW midpoint memo remain opt-in/off.
## Instrumentation
`--instrument-tile-drain` emits clearly labelled `[CpuTileInstrumentation]`, `[CpuTileTimeline]`, and `[CpuTileStages]` records. Timeline events include queued, dispatch, and finish timestamps per tile, tile/LOD key, worker, queue depth, active workers, rank, and service/wait time. Buffered events are dumped after the run. Stage records cover classification and field sampling, MC grid/cell/gradient/interpolation/dedup, connector and ground/cap work, skirts, and assembly.
Counters include proof-skipped air/solid cells and avoided samples, separate Z-band rejects, X8 calls/active lanes, `GradAt` calls/memo hits, midpoint attempts/hits, skirt edge candidates/boundary edges/probes/triangles, and FI local/shared cache hits, misses, computes, conflicts, and lock wait. With instrumentation off, paired source-vs-HEAD medians stayed within 2%; the largest observed difference was +1.98% (caves, within run noise).
## Static all-LOD drain
Clean static traces are 2,370 tiles per recipe, with no hash or camera-movement work. Worker seconds are summed across workers, not wall time.
| LOD | SW worker-s | FI worker-s |
|---:|---:|---:|
| 0 | 2.238 | 29.710 |
| 1 | 1.234 | 2.825 |
| 2 | 1.147 | 2.159 |
| 3 | 0.818 | 1.830 |
| 4 | 1.426 | 2.115 |
| 5 | 0.553 | 0.852 |
| 6 | 1.940 | 2.779 |
| 7 | 1.103 | 2.057 |
| 8 | 2.857 | 5.850 |
| **Total** | **13.316** | **50.178** |
SW’s LOD1–8 work is 11.078 worker-s, led by LOD8 (2.857), LOD6 (1.940), and LOD4 (1.426). This is why an LOD0-only cut cannot get SW to 1 s. Across all LODs, grid work is 5.503 worker-s for SW and 36.414 for FI; skirts are 1.810 and 2.787 worker-s. FI LOD0 alone is 27.610 s grid plus 1.163 s skirts.
Queue p95 wait/service by priority tier (ms):
| Recipe | Near 27 | Coarse LOD2+ | Distant LOD0/1 detail |
|---|---:|---:|---:|
| SW | 11.377 / 9.283 | 806.408 / 21.861 | 1101.381 / 8.270 |
| FI | 129.055 / 76.012 | 1576.290 / 26.440 | 4143.439 / 98.045 |
The last 20 completions are LOD1 for both; the detailed tile keys and worker IDs are in `Saved/Linux/l55/timeline-static/queue-summaries.txt`. Workers were idle while work remained queued for 9.957 ms total in SW and 45.993 ms in FI (maximum observed intervals 0.930 and 13.613 ms). The long tails are work, not a large scheduler-idle gap.
Representative LOD0 counters:
| Counter | SW | FI |
|---|---:|---:|
| Candidate / classified cells | 16,777,216 / 16,777,216 | 14,483,456 / 13,591,040 |
| Proof skips (air / solid) | 0 / 0 | 892,416 / 0 |
| X8 calls / active lanes | 3,449,600 / 21,952,000 | 862,400 / 5,488,000 |
| `GradAt` calls / memo hits | 2,061,424 / 1,502,790 | 1,128,688 / 816,926 |
| Midpoint attempts / memo hits | 244,777 / 0 | 39,108 / 0 |
| Skirt edges / boundary / probes / triangles | 1,546,335 / 44,429 / 492,056 / 179,600 | 846,714 / 30,492 / 480,053 / 198,464 |
Z-band rejects are separate from proof skips: 368,896 cells across LOD3–5 for each recipe. FI LOD0 cache counts: local 34.576M hits, 27.683M misses, 27.597M conflicts; shared 23.951M hits, 3.767M misses, 3.733M computes, 3.696M conflicts, and 150.689 ms lock wait. All-LOD per-tile spans/counters are in `Saved/Linux/l55/timeline-static/sw.log` and `fi.log`.
## Measured cuts and A/Bs
- **FI sign-edge repair:** parallel compute plus sorted serial publication reduced the five-pair median sign-edge substage from 535 ms to 47 ms (−487 ms). In the isolated A/B, shape was 0.979→0.481 s, first tile 1.336→0.815 s, near ring 1.496→0.998 s, whole view 5.898→5.462 s (−7.39%).
- **Proof block size:** FI block4 vs block8 changed whole view 6.140→6.380 s (+3.91%); block16 vs block8 was 6.166→6.322 s (+2.53%). Reject both as defaults. Their mesh/payload/topology hashes matched, but density hashes changed, so they remain experimental.
- **Active-lane batching:** FI whole view 6.206→6.173 s (−0.53%, within noise); exact hashes, no default.
- **Exact midpoint memo:** SW LOD0 memo hit 178,257 of 244,777 attempts and reduced interpolation worker time 381→156 ms, but whole view only 1.878→1.870 s (−8 ms, −0.43%); shape/first/near each regressed slightly. No default.
- **Shape helper cap 8→12:** regressed FI whole view 5.732→5.989 s (+4.48%) and SW 1.833→1.839 s (+0.33%). Restored cap 8.
## Five interleaved before/after pairs
Five pairs per recipe, baseline HEAD vs final source; table values are medians at 24 m camera steps, in seconds. Movement p50/p95 are milliseconds and are shown at both 8 m and 24 m steps.
| Recipe | Shape | First tile | Near ring | Whole view |
|---|---:|---:|---:|---:|
| SW | .459→.458 | .538→.533 | .558→.556 | 1.783→1.783 |
| FI | .951→.498 | 1.284→.854 | 1.458→1.039 | 6.090→5.653 |
| Caves | .064→.065 | .139→.134 | .204→.199 | .817→.817 |
| Periodic Hills profile | .471→.462 | .508→.501 | .532→.518 | 1.418→1.420 |
| Recipe | 8 m moving p50/p95 | 24 m moving p50/p95 |
|---|---:|---:|
| SW | 24.402/47.833→25.125/49.942 | 63.315/114.997→63.278/114.984 |
| FI | 319.059/501.971→316.029/500.346 | 589.648/977.264→594.046/984.720 |
| Caves | 1.314/1.315→1.351/1.352 | 1.382/1.386→1.399/1.401 |
| Periodic Hills profile | 25.766/51.661→26.506/51.856 | 56.703/109.455→57.792/110.586 |
## Budget to target
The clean instrumented runs measured SW at 0.404 s shape + 1.186 s tile drain (1.590 s total), and FI after sign-edge repair at 0.445 s shape + 4.454 s tile drain (4.899 s total). These are diagnostic runs; the uninstrumented paired medians above are the score.
- **SW to 1 s:** tile drain must fall to about 0.596 s. With ideal W12 balance, that permits at most 7.152 worker-s versus 13.316 measured, a cut of 6.164 worker-s (46%). Removing all LOD0 work saves at most 0.186 s of ideal drain. Removing all LOD6–8 work saves at most 0.492 s; both are ceilings and would violate the quality bar if done indiscriminately. Exact cuts must span LOD0 and the far/mid LOD kernels.
- **FI to 2 s:** tile drain must fall to about 1.555 s, or at most 18.660 worker-s at ideal W12 balance versus 50.178 measured (31.518 worker-s, 63%). LOD0 alone costs 2.476 ideal drain seconds; even deleting all LOD1–8 work would leave about 2.921 s including shape. LOD0 must also lose at least 11.05 worker-s (37%) in that impossible best case, so the practical plan needs large LOD0 grid savings plus reductions across other LODs.
## Proofs, tiers, hashes, and run accounting
- Fast, medium, and full `verify.py` tiers passed in 153.3 s, 902.8 s, and 1091.2 s. Medium covered LOD0–8, seeded SW/FI/profile at W1/W8/W12, four cave cameras at W1/W8/W12, and captures. Full passed GCC parity, random camera sweep, 30 determinism cells, and five cost pairs each for SW/FI. No visible regression was reported by capture checks.
- FI proof audit: block4 checked 225,438 blocks / 77,325,234 samples; block16 checked 3,324 / 22,799,316; zero violations. Default block8 and brute-force interval checks also passed. The parallel repair hash matrix had 9/9 Clang/GCC W1/W8/W12 comparisons exact, zero differing tiles (2,370 per run).
- No selected output change, so no recipe version bump. FI Clang/W12 parallel whole-view hashes: density `0x55f117f15cd44103`, mesh `0xd987bfc3a5888d04`, payload `0xf04ce3c0b238a8c4`, topology `0xa4601550e27a18a4`.
- Source stamp: `8ee96d6cd3fbb1cd9c3f84d52698f19671c53326b5f87172f8a34c56b5a1a5e9`. Binary SHA256: Clang headless `7bd64ef2930f69079cd8b2f2f3c5d8c21e1cb6e4f81e5b0a3071abf1aff85d11`; GCC headless `1a3326224d6dab92e7e3260a8270d9f6668365a5156b96eae7d7cc40e38b3ba0`; Clang capture `5c51ea92321280ee35ba689d486747c530c28cc20955d4b5ffc4ce5980cf7229`.
- Trial builds: **7/15**. Failed/non-result attempts: initial fast preflight stopped before build because the candidate/TMPDIR was absent; first cave timeline fixture/layout was invalid and was rerun with the canonical caves fixture; first FI block4 invocation failed before the binary started because its output directory was absent. One Clang build succeeded with the generic artifact name and was superseded by the correctly named Clang build. A final summary inspection tried `jq`, which is unavailable; the summaries were read with wrapped Python instead. One earlier read-only JSON inspection used bare `python3` outside the required wrapper; it did no build or benchmark and is recorded as a limit exception. All benchmark/build/verification processes otherwise used the required CPU, address-space, job, time, and TMPDIR limits. No installs, commit, push, or stash.
## Orchestrator review (Claude)
Accepted. The stamp matches the final Clang and GCC builds (`8ee96d6c…`); trial count 7 of 15. The instrumentation
is the lasting value: SW is 13.3 worker-s and FI 50.2 worker-s, and their long tails are work, not scheduler idle.
The parallel FI sign-edge repair is exact and moves FI's first tile from 1.28 to 0.85 s. **Lead for next:** the FI
LOD0 column cache shows 27.6 M local conflicts against 34.6 M hits, plus 3.7 M shared conflicts. That's heavy
thrashing on the 27.6 worker-s LOD0 grid path.
@@ -0,0 +1,53 @@
# R24 — Slab + Sparse-Motif Generator
## Design
Reuse the L53 `Heightfield2D` base: `D0 = min(z − h(x,y), c(x,y) − z)`, with `h` and `c` supplied by `flatField`, `periodicHills` or `mirroredRelief`. The L53 profiles already have exact interval checks. Add the court as a radial floor modifier, `h = hL53 + Σ Δj·s((r−rj)/wj)`, where `s(t)=3t²−2t³` is clamped to `[0,1]`. [L53](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/REPORT.md:14>) [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:127>)
Resolve fixed per-strate motif counts in stable-ID order. Derive each candidate sequence from `(seed, strate, ID)`, check route and mouth keepouts, resolved bands, and pairwise spacing, then fail if no safe position exists. The existing resolver already sorts IDs, uses bounded deterministic attempts and rejects unsafe placement; add the missing pairwise spacing rule. Use 80–240 m monolith spacing for the lone-object feel. [Stamp resolver](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ResolvedLayoutInternal.h:1502>) [R43](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux43/REPORT.md:13>)
Use the BVH to prove a tile misses all feature bounds. For candidate hits, evaluate each feature interval and compose in stable-ID order; classify all-air or all-solid only when the **final** interval excludes zero. Include bevel, smoothing and irregularity support in bounds. Extend `isTileShapeFree` for every rock feature; L44 showed that a missing feature envelope can make worker-count results diverge. [R20 interval guidance](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:235>) [L44](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux44/REPORT.md:5>)
Keep profile floor/cap surfaces distinct from resolved ceiling and bedrock bands. Use profile intervals to seat features; keep their support inside the resolved content bounds.
## Motifs, bounds and walkability
All rock fields use negative-inside SDFs and union into the base with `D=min(D0,Sfeatures)`. Bounds include any extra support from smoothing or irregularity.
- **Monolith:** Use a vertical capped-cylinder SDF. Let `qr=ρ−R`, `qz=|z−zc|−H/2`, and `S=√(max(qr,0)²+max(qz,0)²)+min(max(qr,qz),0)`. Use `R=0.8–2 m`, `H=12–32 m`; its AABB is `[xc±R]×[yc±R]×[zc±H/2]`. For query tiles, compute exact radial min/max distance to the center and exact vertical distance bounds, then evaluate the monotone SDF at interval endpoints. Set equal X/Y extents if reusing `fillPillar` for a circular column. Keep it scenic: route clearance is at least `R+0.34 m` plus margin. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:109>) [Pillar SDF](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:6495>)
- **Ramp fin:** Use `q=|Rᵀ(p−p0)|−a` and `S=length(max(q,0))+min(max(qx,qy,qz),0)`. For world bounds, use half-extents `e=|R|a`; transform the query box to conservative local coordinate intervals for SDF bounds. Suggested dimensions are 8–20 m face width, 1–2 m thickness and 12–32 m rise at 75–90°. The optional ~1 m crest is decorative. Faces and crest are non-walkable; keep a separate bypass at or below 15°. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:91>)
- **Terrace and pool court:** This is a heightfield modifier, not an SDF stamp. Bound `r` exactly over each tile’s XY box and propagate its range through the smoothsteps; support ends at the outer ring radius. Use 2–5 rings, 0.15–0.4 m rise per ring, 3–6 m transition width, and 4–12 m court radius. Walkability depends on the composed floor grade and capsule support. On flat ground, a 0.4 m rise over 3 m is 11.3°; on the 7.9° periodic profile it can exceed 15°, so widen the transition or route around it. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:136>) [L53](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/REPORT.md:10>)
- **Dais/platform:** Use an explicit rounded-box SDF: `q=|Rᵀ(p−p0)|−a+rb`, `S=length(max(q,0))+min(max(q),0)−rb`. Bounds are `p0±|R|a`. Keep platforms decorative until their top joins the route and passes the final-field support check. Current `fillDais` changes from rounded box in vocabulary v1 to ellipsoid in v2, so give platforms an explicit versioned shape kind. The L43 dais half-extents `(3.2, 2.8, 0.9) m` are a visual reference, not a walkability result. [Dais SDF](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:6484>) [L43](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux43/REPORT.md:23>)
## Water
Keep water as a separate positive-inside occupancy channel `W`. For the pool, use `Wpool=min(z−hpool(r), zw−z, Rp−r)`. For each fixed stream segment, use `Wstream=min(z−bed(s), zw(s)−z, width(s)/2−dxy)` with end caps; union segments and pool with `max`. Join the stream level to the pool surface and store its direction for the static material. Render a local pool top and stream surface; do not simulate flow.
The existing water fill is vertical and the renderer creates a player-following, non-colliding horizon plane. Local water needs body records, its own bounds/BVH and tile scheduler so an all-air rock tile can still emit water. Keep the bypass dry. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:133>) [Water renderer](</home/jahni/VoxelM/Plugins/VoxelForge/Source/VoxelForge/Private/VoxelContentManager.cpp:2561>) [Current fill](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/WorldAssemblerInternal.h:2610>)
## Sharp geometry and cost
At 25 cm sampling, Marching Cubes can bevel a 90° edge by up to about 17.7 cm depending on phase. Encode intentional foot, cap and platform fillets in the geometry: R16 recommends at least 0.5 m at LOD0 and about 0.75 m preferred. Treat `smoothWidth` as a field-space width and measure the resulting geometric radius. Keep physical bevels fixed across LOD; an 8-voxel LOD8 step is 2 m, so a 1.6 m diameter monolith or 1 m crest may disappear without feature-aware LOD retention. [R20](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research20/REPORT.md:241>) [R16](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research16/REPORT.md:4>) [CGAL 6.3 Isosurfacing manual](https://cgal.github.io/9465/doc/Isosurfacing_3/index.html)
The existing sharp path is limited to tagged planar boxes at interior LOD0; tile borders and coarse LOD fall back to Marching Cubes, and the full 2:1 transition gate still fails. Gate fins on phase-shifted remeshes, tile borders, LOD transitions and matching collision. R21 also notes that L49’s one-void proposal is unvalidated in this checkout. [M2](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM2/REPORT.md:10>) [R21](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research21/REPORT.md:93>)
Expect profile-class cost plus local feature-hit work: L53 profiles measured about 1.33 s cold W12; L54 caves about 0.73 s. L43’s small stamp delta covers no-hit tiles only, so it does not measure motif evaluation. Use ≤1.75 s cold W12 as a provisional target and establish paired on-feature costs. [L53 timings](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/REPORT.md:32>) [L54 timings](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux54/REPORT.md:37>) [L43 cost scope](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux43/REPORT.md:35>)
## Authoring and slices
Add an optional `CoreGeometry` block to the existing per-strate `UVoxelStrateDefinition` asset. Per strate, author the base profile, fixed motif counts, stable IDs, metre size ranges, candidate regions, spacing/keepouts, quantized pose, attachment policy, bevel and palette IDs. Add pool/stream records for radius, depth, surface, path, width, bed and water palette. Convert metre fields once to integer micrometres at the adapter; include resolved geometry and water records in `stableIdentity`. [R17](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research17/REPORT.md:5>) [R8](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research8/REPORT.md:7>) [Epic Data Assets](https://dev.epicgames.com/documentation/unreal-engine/data-assets-in-unreal-engine) [UE units](https://dev.epicgames.com/documentation/en-us/unreal-engine/units-of-measurement-in-unreal-engine)
For each slice, extend `verify.py` with a custom fixture, brute-force interval and BVH checks, false all-air/all-solid controls, a whole-surface audit over feature-bound ROIs, final-field capsule reachability and W1/W8/W12 hash checks. The L48 whole-surface audit is not yet wired into the tiers. [Verify tiers](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Tools/verify/README.md:13>) [R21](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research21/REPORT.md:117>)
1. **Fast:** `flatField`, one monolith and one decorative platform. Audit monolith foot/cap and platform edges; check route clearance and deterministic placement.
2. **Medium:** add periodic/mirrored profiles and 1–4 fins. Audit fin foot, tip, crest and borders; add actual phase remesh, LOD0–8, 2:1 transition and collision gates.
3. **Full:** add the terrace court, pool and stream. Audit ring/shoreline/stream-bank surfaces, water intervals and wet tiles over rock-all-air regions; include dry-route reachability, Clang/GCC and the 30-cell determinism sweep.
Capture every slice with a wide eye-level view that keeps the cap and motif in frame, plus a high oblique overview that shows spacing and route. L53’s quality gates passed while its views missed both the hills and cap. [L53 capture review](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux53/REPORT.md:49>)
**Owner question:** Approve an authored ~0.5 m fin-edge radius for the first prototype, or hold fins until the feature-aware cross-LOD path passes?
Read-only review only; no files changed and no scripts, tests, builds or binaries were run.