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
omega-mv / spec / offline-evidence-v1.md
| 1 | # Offline evidence schema v1 (OEV1) for the resource-DAG cost simulator |
| 2 | |
| 3 | Status: FROZEN 2026-10-19 (omega-mv#583, implement item 1). Consumers: omega-mv#583 |
| 4 | (`tools/dagsim`), omega-mv#584 (candidate screening), aien-architecture#246 (lifecycle |
| 5 | ledgers). A change to a frozen field is a v2, never an edit of v1. |
| 6 | |
| 7 | Purpose: one text file describes a machine, the build and calibration it was measured |
| 8 | with, the resources, an operation DAG with demands, buffer lifetimes, dependencies, |
| 9 | synchronization and the energy instrument, so that an offline evaluator (no GPU, no |
| 10 | execution) can compose existing per-operation estimates into whole-DAG costs and bounds. |
| 11 | The file never carries a number without saying where it came from. |
| 12 | |
| 13 | ## File form |
| 14 | |
| 15 | Plain text, UTF-8, one record per line, fields separated by whitespace, `key=value` |
| 16 | pairs after the record keyword, `#` to end of line is a comment. Unknown keywords are |
| 17 | errors (a parser that silently ignores a field would let a fabricated or misspelled |
| 18 | number through). Line numbers are reported on every error. No value may contain |
| 19 | whitespace. Maximum 256 operations, 32 resources, 256 buffers, 1024 dependencies |
| 20 | (static limits; a larger DAG is refused with `REFUSED_UNSUPPORTED`, not truncated). |
| 21 | |
| 22 | Units are fixed by the schema and never per record: time `ns`, bytes `B`, |
| 23 | bandwidth `B/s`, power `W`, energy `J`, capacity `B`. Dates are `YYYY-MM-DD`. |
| 24 | Integers are decimal; reals accept `1.5e9`. |
| 25 | |
| 26 | ## Provenance (mandatory wherever a number appears) |
| 27 | |
| 28 | `prov=` takes exactly one of: |
| 29 | |
| 30 | | value | meaning | |
| 31 | |---|---| |
| 32 | | `specified` | a vendor or design ceiling (datasheet). Never attainable by itself. | |
| 33 | | `measured` | read from an instrument on the named machine; `src=` names the receipt. | |
| 34 | | `fitted` | produced by a model fitted on measurements (e.g. `rx_costmodel`); `src=` names the model blob or the fit receipt. | |
| 35 | | `synthetic` | made up for a sensitivity study; results that depend on it are labelled synthetic and never ranked as real. | |
| 36 | | `unknown` | nobody knows. The evaluator refuses to turn this into a number. | |
| 37 | |
| 38 | `lo=` and `hi=` give the interval that the source supports (for `measured`: the repeat |
| 39 | spread of the receipt; for `fitted`: the model's predictive interval). Missing `lo`/`hi` |
| 40 | on a `measured` or `fitted` value means "no interval known" and the evaluator reports |
| 41 | the result without interval coverage. |
| 42 | |
| 43 | ## Records |
| 44 | |
| 45 | ``` |
| 46 | oev version=1 |
| 47 | machine id=<host> soc=<name> cores=<n> mem_bytes=<B> prov=specified src=<where> |
| 48 | build repo=<name> sha=<40 hex> [physics=<sha>] |
| 49 | calibration id=<name> taken=<YYYY-MM-DD> valid_days=<n> load1=<x> src=<receipt dir or file> [model=<path to rx_costmodel blob>] |
| 50 | resource id=<name> kind=compute slots=<n> prov=<p> src=<s> |
| 51 | resource id=<name> kind=bandwidth cap=<B/s> [lo=<B/s> hi=<B/s>] prov=<p> src=<s> |
| 52 | resource id=<name> kind=capacity cap=<B> prov=<p> src=<s> |
| 53 | resource id=<name> kind=launch prov=<p> src=<s> |
| 54 | op id=<name> kind=<compute|copy|matvec|barrier|storage|persist> [engine=<compute res>] [t_ns=<x> lo=<x> hi=<x> prov=<p> src=<s>] [bytes=<B> bw=<bandwidth res>] [launch_ns=<x> launcher=<launch res>] [M=<n> N=<n> core=<0|1|2> arm=<n>] |
| 55 | dep <from op> <to op> |
| 56 | buffer id=<name> bytes=<B> cap=<capacity res> [first=<op>] [last=<op>] |
| 57 | sync id=<name> ops=<op,op,...> |
| 58 | energy instrument=<none|name> [boundary=<wall|gpu_module|soc>] [joules=<J> prov=measured src=<receipt>] [power_w=<W> prov=synthetic] |
| 59 | removed op=<id> reason=<eliminated|reused|unchanged_dep|deferred|moved|shared|lookup> [ref=<op or result identity>] [proof=<src>] |
| 60 | ``` |
| 61 | |
| 62 | Semantics the evaluator is allowed to rely on: |
| 63 | |
| 64 | - `machine`, `build`, `calibration` appear once. Every `measured` or `fitted` value is |
| 65 | valid only inside the calibration's validity envelope: the evaluator takes an |
| 66 | `asof` date and refuses (`REFUSED_STALE`) when `asof > taken + valid_days`, and refuses |
| 67 | (`REFUSED_NO_CALIBRATION`) when a measured or fitted value appears without a |
| 68 | `calibration` record. `load1` is the host load during the measurement; it travels with |
| 69 | every result so a loaded-box number is never quoted as a quiet-box number. |
| 70 | - `resource kind=compute slots=n`: n operations may run at once on this engine. A |
| 71 | compute resource is a CPU core pool or the GPU; the schema does not model SM-level |
| 72 | occupancy. |
| 73 | - `resource kind=bandwidth cap=B`: a shared fluid pipe. k operations streaming at once |
| 74 | each get `cap/k` (processor sharing). This is the only contention rule in v1; it is |
| 75 | what makes "sum of concurrent full-bandwidth claims" impossible by construction. |
| 76 | - `resource kind=capacity`: a byte ledger. CPU and GPU unified memory are ONE capacity |
| 77 | resource on the Spark; a file that declares two for the same DRAM is wrong, not refused |
| 78 | (the evaluator cannot know), so the convention is one `unified_mem` resource. |
| 79 | - `resource kind=launch`: a serial queue. Launch cost is paid once per op, one op at a |
| 80 | time per launch resource, before the op's own work. It is additive only when serialized; |
| 81 | two engines with two launch resources overlap their launches. |
| 82 | - `op`: `t_ns` is the operation's own busy time on its engine (compute floor, `F/P`). |
| 83 | `bytes`/`bw` is its traffic on a bandwidth resource (traffic floor, `Q/B`). The op's |
| 84 | ideal floor is `launch + max(t_ns, bytes/cap)`; v1 assumes perfect overlap of its own |
| 85 | compute and traffic inside one op (the issue's stated floor). `kind=barrier` has no |
| 86 | cost and only orders. `kind=matvec` with `M`,`N`,`core`,`arm` and no `t_ns` gets its |
| 87 | `t_ns`, `lo`, `hi` from `rx_costmodel` (`rx_cm_predict`) using the blob named by |
| 88 | `calibration model=`; if that cell is not `known`, the op is `unknown` and the DAG is |
| 89 | refused. `kind=storage` and `kind=persist` are ops whose `bw` is a storage resource. |
| 90 | - `dep a b`: b starts after a ends. Cycles are refused. |
| 91 | - `buffer`: live from the start of `first` to the end of `last`. Missing `first` means |
| 92 | live from t=0 (resident state); missing `last` means live until the end. The occupied |
| 93 | interval is half-open `[start, end)`: live at time t when `start <= t < end`. `start` |
| 94 | is the scheduled start of `first` (or 0); `end` is the scheduled end of `last` (or the |
| 95 | makespan). `end == start` is empty (a zero-duration operation or buffer): it contributes |
| 96 | no live bytes and cannot offset another buffer. `end` earlier than `start` is inverted: |
| 97 | the evaluator refuses `REFUSED_LIFETIME` before any capacity certificate or ranking, |
| 98 | naming the buffer, both endpoint operations (`omitted` when the field is absent) and the |
| 99 | resolved times. At one timestamp, frees of intervals that started earlier are applied |
| 100 | before allocations, so a buffer that ends when another starts does not occupy both |
| 101 | (completion/allocation tie). An accepted ledger never goes negative. Peak live bytes |
| 102 | per capacity resource must not exceed `cap`, else `REFUSED_CAPACITY` naming the time |
| 103 | and the buffers. No frozen field was added; this is the interval convention for the |
| 104 | words already in v1. |
| 105 | - `sync id=X ops=a,b,...`: declares a barrier op `X` (no cost, no engine) that completes |
| 106 | when every listed op has completed. Order later work after it with `dep X y`. A barrier |
| 107 | with a measured cost is written as `op id=X kind=barrier t_ns=... prov=...` plus `dep` lines. |
| 108 | - `energy`: `instrument=none` makes every energy figure `UNMEASURED`. A named instrument |
| 109 | with `joules` and a receipt is a measured whole-run figure for the named boundary; the |
| 110 | evaluator never splits it per op. `power_w` with `prov=synthetic` allows a labelled |
| 111 | sensitivity figure `E = P * T` that is never ranked as real energy. `TDP` is not an |
| 112 | instrument. |
| 113 | - `removed`: minimum-work accounting (parent clarification). An op listed here is absent |
| 114 | from the transformed DAG; the record keeps why. `reused`/`lookup` need `ref=`; a |
| 115 | remaining op that depends on a removed op whose reason is not `reused`/`lookup` is a |
| 116 | refusal (`REFUSED_REMOVED_REQUIRED`: required work cannot be removed by assertion). |
| 117 | |
| 118 | ## What a result must carry |
| 119 | |
| 120 | Every evaluator output names: schema version, `machine.id`, `build.sha`, |
| 121 | `calibration.id` and `load1`, `asof`, the status (`OK`, `REFUSED_*`), the set of |
| 122 | provenances that fed the result, makespan nominal/lo/hi, the critical-path bound and each |
| 123 | resource-work bound (both must be <= makespan), peak live bytes, energy status, the |
| 124 | attribution ledger (compute, bandwidth, contention, launch, serialization, sync, |
| 125 | residual), and the counterfactual sensitivities. A result whose inputs include |
| 126 | `synthetic` is marked `synthetic=1`. A result never contains a number for an `unknown` |
| 127 | input. |
| 128 | |
| 129 | ## Pinned sources for v1 fixtures |
| 130 | |
| 131 | - Spark host `spark-b87b`, GB10, 20 cores, 128 GiB unified memory (specified), DRAM |
| 132 | 273 GB/s (specified). |
| 133 | - M1 hardware passport, omega-mv#578, receipts `~/yardsticks/aien-model/M1/` (measured, |
| 134 | load 15 to 29, omega f4a9849f): block1 realization call path 19.4 to 22.8 us per call; |
| 135 | block2 GPU submit lifecycle 36.8 to 41.6 ms per job (fixed, size independent); block4 |
| 136 | CPU memcpy 1 thread 17.1 to 18.5 GB/s read+write at 1 GB, 8 threads 60.8 to 69.8 GB/s |
| 137 | at 1 GB; GPU weight stream 218.6 GB/s from handoff 2026-10-19-qwen38-decode-speed.md |
| 138 | (not re-measured in M1). |
| 139 | - Not available on 2026-10-19 and therefore `unknown` in every fixture: aien-architecture |
| 140 | #244 traces, #252 clock calibration, #253 hardware atlas, #274 lifetime maps (all |
| 141 | NOT_RUN at the time of freezing). Fixtures that need them refuse. |