interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / docs / turing / TURING_YIELD_ENERGY_PROTOCOL_V0.md

261 lines · 17822 bytes Raw Blame History Source

TURING Yield energy protocol V0 (TY-4 measurement reuse, TY-5 concurrent attribution)

Update 2026-09-30: R16 is CLOSED (omega#112, 3dd5eaa, all gates G1 to G8 PASS) and the src/runtime/ edit freeze is LIFTED (aien-architecture #70, e89ba94). Statements below that the runtime is frozen "until R16" describe the state when this was written.

Status: PRE-REGISTERED. Committed and pushed before any timed run of stage 1 or stage 2. Any change after data is seen is a dated amendment at the end of this file, committed before the run it affects. Branch feat/turing-yield-ty45, base omega a927bd6. Date 2026-09-29.

1. Question

When two CPU workloads run at the same time, is the package energy of the pair different from the sum of their separate costs, and can an inspectable model built from independent signals predict the pair's energy without being fitted on it?

The identity I = E_AB - E_A - E_B + E_0 is algebra. Writing it down proves nothing. The evidence is:

2. What is reused, what is new

3. Workloads (fixed)

4. Conditions and order

Conditions per round: IDLE (no workload), A, B, AB (A and B started together). IDLE is a shuffled condition in every round, so each round has its own baseline; there is no fixed idle measured once.

Order: the four conditions are shuffled within each round by a seeded splitmix64 Fisher-Yates shuffle (ty_energy_window --plan). The seed is recorded in the run manifest. Seeds: stage 1 0x7459510001, stage 2 0x7459520001.

Per window: workloads are started and packed, all report READY, then a fixed 2 s settle, then the start reading, GO, the planned window, the end reading after every workload has exited. IDLE uses the same settle and length. Between windows the shell waits 3 s.

5. Stage 1: contention sweep (exploratory, selects the case)

Configurations (A cores | B cores):

idABmeaning
S156same L3, 1 + 1 core
S2515cross L3, 1 + 1
S35,67,8same L3, 2 + 2
S45,615,16cross L3, 2 + 2
S55,6,78,9same L3, 3 + 2 (all X925 of cluster 0)
S65-915-19cross L3, 5 + 5 (all X925)

Window 10 s, 3 rounds per configuration, configurations in seeded shuffled order, rounds of one configuration together.

Contention score per configuration: for each round, slowdown s_X = 1 - calls_X(AB) / calls_X(solo) for X in {A, B}; round score (s_A + s_B) / 2; configuration score = mean over rounds.

Selection rule (fixed now):

6. Stage 2: confirmatory runs

For the contention case and the control case, in that order: 10 rounds of {IDLE, A, B, AB}, window 30 s (the audit's error budget needs >= 19 s for 1% resolution of I; 30 s gives margin). Duration about 24 min per case.

7. Recorded per window

Written as one r15-format JSONL record per window (kind":"ty_window"), raw files never overwritten:

Meter facts recorded with the results: resolution 1 mJ step (readings end in 000 µJ) is not accuracy; sampling 10 Hz, sensor update about 0.1 s; 32-bit mJ counters wrap at about 4.29 MJ, flagged by overflow_raw; no external calibration, so absolute accuracy is not claimed; gpc_unverified always reads 0 and is unused; observed variance is reported per condition.

8. Validity (a window is refused, never repaired)

A window is refused if any of: SPBM unavailable or not ok at either edge; any overflow flag set; any energy counter decreased (r15_reduce rule, reused); a counter within one window's worth of the wrap; a gap between consecutive 10 Hz samples > 300 ms or fewer than 90% of the expected samples; a workload that failed the oracle check, was not pinned, exited early, or ran < 98% of the planned length (partial run); a workload interval not inside the meter window (interval mismatch); two windows whose meter intervals overlap; PMU running < 99.9% of enabled on the X925 PMU (multiplexed counts). A round with any refused window, or without its IDLE window, gives no I.

9. Normalisation and uncertainty

10. Check (a): interval on I

Per round r: I_r = E_AB - E_A - E_B + E_0 on each channel. Primary statistic: mean over valid rounds with 95% Student-t interval (n - 1 degrees of freedom). Secondary: 95% bootstrap percentile interval of the mean (splitmix64 seed 0x15, 10,000 resamples, same generator as r15_reduce). I is distinguishable from zero iff the primary pkg interval excludes zero.

Check (a) PASSES (the measurement answers the question) iff >= 8 of 10 rounds are valid and the primary pkg interval half-width is <= 2% of the mean E_AB pkg. The finding (zero, positive, negative) is stated separately from pass/fail.

11. Check (b): held-out coalition prediction

Model (fixed now), per window, pkg channel:

E_w = p0 * T_plan + a * CYC_w + b * INST_w

CYC_w, INST_w = sum over the window's workload processes of X925 PMU cpu_cycles and inst_retired (0 for IDLE). Fit: ordinary least squares on every valid IDLE, A and B window of the case. Held out: every AB window (never used in the fit). The fit reports its coefficients, residual SD s (n - 3 degrees of freedom) and the condition number of the column-scaled design; above 1e4 the fit is DEGENERATE and check (b) FAILS.

Prediction for an AB window uses the counters measured in that AB window. Per-window 95% prediction interval +- t * s * sqrt(1 + h), h the leverage.

Check (b) PASSES iff the fit is not degenerate, the 95% t-interval of the mean held-out error (observed - predicted) contains zero, AND at least 80% of held-out windows fall inside their prediction intervals.

Reported next to it (not pass/fail): the naive additive model E_A + E_B - E_0 (its error is exactly -I); the same counter model on cpu_p; a variant with l2d_cache_refill in place of inst_retired.

12. Attribution records and conservation

Per valid AB window two attributions are built and checked:

  1. Solo counterfactual: idle share E_0 (COUNTERFACTUAL), A E_A - E_0, B E_B - E_0 (COUNTERFACTUAL), remainder = measured - allocated. A remainder >= 0 is recorded UNATTRIBUTED. If allocated exceeds measured by more than the tolerance (1.96 x empirical SD of I, floored at the analytic edge bound) the attribution is REFUSED.
  2. Counter model (only if check (b) passes): idle p0 * T_plan (MODELLED), A and B from their own AB-window counters (COUNTER_DERIVED), remainder UNATTRIBUTED, same refusal rule.

The measured window total is DIRECT. Confidence scale and its mapping to physics FORGE V2 energy_source (forge/v2/forge_substrate_v2.h, 3 levels), fixed in src/turing/ty_energy.h:

TY confidencemeaningFORGE V2 energy_source
DIRECTread from the meter for exactly this interval and boundaryMEASURED (1)
COUNTER_DERIVEDa measured total split by measured per-participant countersMEASURED (1)
CAUSAL_RUNTIMEsplit by the runtime's own causal record of who ranESTIMATED (2)
COUNTERFACTUALtaken from a different window (solo or idle)ESTIMATED (2)
MODELLEDfrom a fitted or cost model, not read for this intervalESTIMATED (2)
UNATTRIBUTEDmeasured but assigned to nobodyNOT_MEASURED (0)

COUNTER_DERIVED maps to MEASURED because FORGE has no finer level; the TY record keeps the finer label. FORGE is not changed.

Records use new digest domains turing.resource_interval.v0 and turing.resource_attribution.v0 (SHA-256(domain || 0x00 || OMG0 bytes), as in src/turing/field.c), integers only (µJ, ns). No existing turing.* encoding or golden changes.

13. Quiet machine and safety

tools/ty_energy_run.sh runs detached (setsid nohup). Before each stage it waits until load1 < 2, no other make, bench or qualify process runs, and ~/workspace/.spark-quiet is absent; then it creates its own quiet flag, runs the stage, and removes the flag only if it is still its own. It never kills anything. Other tenants that start later are recorded per window (background busy time), not hidden.

14. R16 loop inventory

The rounds, idle waits and the between-window pause live in shell (outside the R16 scanner's file types). The C files hold only a deadline-bounded call loop and bounded for loops with none of the scanner's wait words, so they add no loop-inventory site. Checked with tools/r16_loop_inventory.sh after coding; the result is recorded in the result document.

Amendments

2026-09-29, before the first timed stage 1/2 run: Codex completed the interrupted harness in an isolated worktree. Energy symbols use the ty_energy/TYE namespace to coexist with TY-1. Hostile synthetic fixtures and sanitizer checks reject malformed records, arithmetic overflow, missing sensors, counter wrap and failed participants. The driver holds the existing .argus-bench.lock as well as its owned quiet flag. Workloads, seeds, stage selection, fitting and qualification thresholds above are unchanged. CI fixtures are synthetic and prove no hardware energy result. No timed data has been used to tune this amendment.

2026-10-19, amendment 2, before any timed TY-4/TY-5 window (no data seen; ledger L109). The protocol cannot be followed as written on the box today, for three reasons found by inspection:

  1. No package meter. The aien_spbm hwmon is not loaded on this boot (no /sys/class/hwmon/*/name equals aien_spbm). Loading it needs sudo, which agents do not use (handoff 2026-10-05-spbm-energy-operator-steps.md gives the operator steps). ty_energy_window still runs workloads and records PMU counts, timing and box state with meter_ok: 0, but every window is refused for energy by ty_energy_reduce, and stage 1's selection needs valid windows, so the reducer cannot select or compute I.
  2. The quiet rule changed. tools/ty_energy_run.sh creates the machine-wide ~/workspace/.spark-quiet flag and waits for load1 < 2. Agents may no longer raise that flag without Drake, and the shared box has not been below load 2 today (sensor log). The current mechanism is quiet-measure (holds off new builds) with the 20-minute rule (if the wait exceeds 20 minutes, run and record the load).
  3. A new meter exists. Wall power from the UPS, ~/yardsticks/sensors/<date>.csv, one row every ~2 s, 10 W steps, whole UPS output (not the Spark alone).

What runs instead (TY-4/TY-5 wall amendment, "TYW"):

The hostile fixture tests (make test-turing-energy) are run unchanged and reported.