Skip to content

verify: fix STRATA_VERIFY_PROFILE stage columns (unsigned stamp wrap + slot collision) - #320

Closed
xyzzing wants to merge 1 commit into
Niko1221:mainfrom
xyzzing:pr/d8-verify-columns-20260930
Closed

xyzzing wants to merge 1 commit into
Niko1221:mainfrom
xyzzing:pr/d8-verify-columns-20260930

Conversation

@xyzzing

@xyzzing xyzzing commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Fixes the STRATA_VERIFY_PROFILE stage report so its derived columns ((gap), head, hc0 norm/down/up) print sane ms/window values instead of \~1e14 ms. Metrics-only — no computed model value changes; this only affects the profiler's reported columns.

Two integer-arithmetic defects:

  1. Slot collision (kProfPer 32 -> 33). The hc-read second half's up stamp was written to slot 32, which is the next layer's slot 0. That both corrupted the next layer's base stamp and left the up-stamp unreadable.

  2. Unsigned wrap on absent/out-of-order stamps. A slot no kernel stamped is 0; an unsigned to - from where from wrapped to \~1e19 ns, which is the \~1e14 ms we were seeing.

The fix introduces a gap(to, from) helper that contributes 0 unless both stamps are nonzero and monotonic (to >= from), bumps kProfPer to 33, and shows the hc-read0 norm/down/up split only when the whole split chain is present (so it isn't counted twice). The column-header array is extended to match.

With the columns sane, the verify-window residual could be attributed: it is the wait for rings column (28 ms/round), and a no-doorbell floor (STRATA_VERIFY_DEVICE_PLAN=1) leaves it unchanged, so it is host-ring submission latency, not the expert-pool doorbell round-trip. Deliverable 3 of #228, re-scoped to stand alone per your request.

… hc-read second half stops overwriting the next layer's base stamp

kProfPer 32 -> 33: fused_gr_read_multi writes three stamps per half and the second
half's base was 30, so its up-stamp landed at slot 32 = (l+1)*32 + 0, the next layer's
stage-0 base.  Derived columns (gap/head/hc0) also wrapped to ~1.8e19 ns whenever a
slot was unstamped, printing ~1e14 ms per window.  A delta now counts only when both
stamps are nonzero and monotonic; the hc0 split replaces the single hc-read0 column
only when the split chain is complete.  Metrics-only: no computed model value changes.
Reason recorded in PORTING.md 19.
@Niko1221

Niko1221 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Thanks! This is in the 0.1.32 batch. We take it as is; every change goes through our identity gate (byte-identical output on four models) and a speed A/B before it ships.

@Niko1221

Niko1221 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Released in 0.1.32 as is. Merged under your name (GitHub doesn't show it as merged because it went in by hand). Thank you!

@Niko1221 Niko1221 closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants