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 / native / prefetch / review-fixtures.om
| 1 | note Independent emitted-shape prefetch classifier fixtures. argv mode L/J. |
| 2 | note Mode 2 is the GB10 red signature: FAIL slots 3 4 5 7 10 11, receipt B identical 0. |
| 3 | text lines "A (baseline, host glue) 3 reps ran\nA deterministic over 3 reps (token 1)\nC (one list per token) 3 reps ran: 100 launches in 1 submission(s)\nC deterministic over 3 reps (token 2)\nargmax token identical: A 1, C 2\nlogits A vs C within 1e-03 of max|logit| (max |d| 0.0001, scale 1)\nB (one launch per submission) 3 reps ran: 100 launches in 100 submissions\nB bit-identical to C (x, hidden, logits, token) in every rep\nnegative control: SWIGLU mutant fails the comparison (token 1 vs 2, max |d| 0.2 = 0.2 of scale)\nnegative control: COMBINE mutant fails the comparison (token 1 vs 2, max |d| 0.2 = 0.2 of scale)\nC after the mutants bit-identical to the first C\ntimeline: rc 0, 100 stamps for 100 launches, monotonic 1, span 1.0 us <= chip 2.0 us, token and logits unchanged\ntimeline off: token rc 0, stamps accessor refuses (-1)\n" |
| 4 | text cline "C deterministic over 3 reps (token 1)\n" |
| 5 | text argline "argmax token identical: A 1, C 1\n" |
| 6 | text bigline "logits A vs C within 1e-03 of max|logit| (max |d| 0.2, scale 1)\n" |
| 7 | text mark "dgraph prefetch 1 (red 1)\n" |
| 8 | text ok "ok: " |
| 9 | text fail "FAIL: " |
| 10 | text sum "chip: 13 checks, " |
| 11 | text failed " failed: FAIL\n" |
| 12 | text passed " failed: PASS\n" |
| 13 | text start "{\"layers\":2,\"vocab\":151936,\"pos\":300,\"reps\":" |
| 14 | text red ",\"red\":" |
| 15 | text cache ",\"cached_weights\":" |
| 16 | text a ",\"A\":{\"token\":1,\"runner_up\":2,\"gap\":0.00001,\"launches\":100},\"C\":{\"token\":" |
| 17 | text c ",\"launches\":100,\"submits\":1},\"A_vs_C\":{\"tok_same\":" |
| 18 | text diff ",\"logit_max_abs\":" |
| 19 | text tiny "0.0001" |
| 20 | text large "0.2" |
| 21 | text tail ",\"logit_scale\":1,\"x_max_rel\":0.001,\"hidden_max_rel\":0.001,\"tol_rel\":0.001},\"mutant1\":{\"rc\":0,\"token\":2,\"logit_max_abs\":0.2,\"caught\":1},\"mutant2\":{\"rc\":0,\"token\":2,\"logit_max_abs\":0.2,\"caught\":1},\"C0_token\":" |
| 22 | text tailtwo ",\"C0_logits_fnv\":\"0123456789abcdef\",\"timeline\":{\"launches\":100,\"span_ns\":1000,\"chip_ns\":2000,\"per_kind_ns\":{\"ATTN\":[2,1000]}},\"median_ns\":{\"A_total\":3000,\"C_total\":2200,\"C_chip\":2000,\"C_record\":200,\"B_total\":4000,\"B_chip\":2000},\"B\":{\"launches\":100,\"submits\":100,\"identical\":" |
| 23 | text tailthr "},\"checks\":13,\"failed\":" |
| 24 | text verdict ",\"verdict\":" |
| 25 | text fv "\"FAIL\"" |
| 26 | text pv "\"PASS\"" |
| 27 | text duptext ",\"checks\":13" |
| 28 | text extra ",\"unrelated\":1" |
| 29 | text badjson ",\"extra\":[1,]" |
| 30 | text finish "}\n" |
| 31 | text garbage "x" |
| 32 | global mode uchar 1 |
| 33 | global kind uchar 1 |
| 34 | global onechar uchar 1 |
| 35 | fn digit n ulong to void |
| 36 | put onechar 0 uchar add n 48 |
| 37 | r = write 1 onechar 0 1 |
| 38 | end |
| 39 | fn line index ulong to void |
| 40 | m = get mode 0 |
| 41 | if or eq m 49 eq m 51 |
| 42 | if eq index 3 |
| 43 | r = write 1 cline 0 len cline |
| 44 | ret |
| 45 | end |
| 46 | if eq index 4 |
| 47 | r = write 1 argline 0 len argline |
| 48 | ret |
| 49 | end |
| 50 | end |
| 51 | if and eq index 5 or eq m 49 eq m 50 |
| 52 | r = write 1 bigline 0 len bigline |
| 53 | ret |
| 54 | end |
| 55 | begin = ulong 0 |
| 56 | current = ulong 0 |
| 57 | for i ulong len lines |
| 58 | if eq get lines i 10 |
| 59 | if eq current index |
| 60 | r = write 1 lines begin add sub i begin 1 |
| 61 | ret |
| 62 | end |
| 63 | current = add current 1 |
| 64 | begin = add i 1 |
| 65 | end |
| 66 | end |
| 67 | end |
| 68 | fn main to int |
| 69 | if ne argread 1 mode 0 1 1 |
| 70 | ret 64 |
| 71 | end |
| 72 | if ne argread 2 kind 0 1 1 |
| 73 | ret 64 |
| 74 | end |
| 75 | m = get mode 0 |
| 76 | bad = ulong 1 |
| 77 | if eq m 50 |
| 78 | bad = 6 |
| 79 | end |
| 80 | if eq m 51 |
| 81 | bad = 0 |
| 82 | end |
| 83 | if eq get kind 0 76 |
| 84 | if eq m 73 |
| 85 | put onechar 0 120 |
| 86 | for i ulong 65537 |
| 87 | r = write 1 onechar 0 1 |
| 88 | end |
| 89 | ret 0 |
| 90 | end |
| 91 | if eq m 74 |
| 92 | put onechar 0 0 |
| 93 | r = write 1 onechar 0 1 |
| 94 | end |
| 95 | if ne m 70 |
| 96 | r = write 1 mark 0 len mark |
| 97 | end |
| 98 | if eq m 69 |
| 99 | r = write 1 mark 0 len mark |
| 100 | end |
| 101 | for i ulong 13 |
| 102 | if and eq m 68 eq i 12 |
| 103 | ret 0 |
| 104 | end |
| 105 | j = i |
| 106 | if eq m 53 |
| 107 | if eq i 4 |
| 108 | j = 5 |
| 109 | end |
| 110 | if eq i 5 |
| 111 | j = 4 |
| 112 | end |
| 113 | end |
| 114 | isbad = eq i 4 |
| 115 | if eq m 49 |
| 116 | isbad = eq i 5 |
| 117 | end |
| 118 | if eq m 50 |
| 119 | isbad = ne and shl ulong 1 i 3256 0 |
| 120 | end |
| 121 | if eq m 51 |
| 122 | isbad = false |
| 123 | end |
| 124 | if eq m 52 |
| 125 | isbad = eq i 0 |
| 126 | end |
| 127 | if and ge m 76 le m 88 |
| 128 | isbad = eq i sub ulong m 76 |
| 129 | end |
| 130 | if isbad |
| 131 | r = write 1 fail 0 len fail |
| 132 | else |
| 133 | r = write 1 ok 0 len ok |
| 134 | end |
| 135 | line j |
| 136 | end |
| 137 | r = write 1 sum 0 len sum |
| 138 | digit bad |
| 139 | if eq bad 0 |
| 140 | r = write 1 passed 0 len passed |
| 141 | else |
| 142 | n = len failed |
| 143 | if eq m 75 |
| 144 | n = sub n 1 |
| 145 | end |
| 146 | r = write 1 failed 0 n |
| 147 | end |
| 148 | ret 0 |
| 149 | end |
| 150 | r = write 1 start 0 len start |
| 151 | n = ulong 3 |
| 152 | if eq m 56 |
| 153 | n = 2 |
| 154 | end |
| 155 | digit n |
| 156 | r = write 1 red 0 len red |
| 157 | n = 0 |
| 158 | if eq m 55 |
| 159 | n = 1 |
| 160 | end |
| 161 | digit n |
| 162 | r = write 1 cache 0 len cache |
| 163 | n = 1 |
| 164 | if eq m 57 |
| 165 | n = 0 |
| 166 | end |
| 167 | digit n |
| 168 | r = write 1 a 0 len a |
| 169 | n = 2 |
| 170 | if or eq m 49 eq m 51 |
| 171 | n = 1 |
| 172 | end |
| 173 | digit n |
| 174 | r = write 1 c 0 len c |
| 175 | n = 0 |
| 176 | if or eq m 49 or eq m 51 eq m 71 |
| 177 | n = 1 |
| 178 | end |
| 179 | digit n |
| 180 | r = write 1 diff 0 len diff |
| 181 | if or eq m 49 eq m 50 |
| 182 | r = write 1 large 0 len large |
| 183 | else |
| 184 | r = write 1 tiny 0 len tiny |
| 185 | end |
| 186 | r = write 1 tail 0 len tail |
| 187 | n = ulong 2 |
| 188 | if or eq m 49 eq m 51 |
| 189 | n = 1 |
| 190 | end |
| 191 | digit n |
| 192 | r = write 1 tailtwo 0 len tailtwo |
| 193 | n = 1 |
| 194 | if eq m 50 |
| 195 | n = 0 |
| 196 | end |
| 197 | digit n |
| 198 | r = write 1 tailthr 0 len tailthr |
| 199 | if eq m 54 |
| 200 | bad = 2 |
| 201 | end |
| 202 | digit bad |
| 203 | r = write 1 verdict 0 len verdict |
| 204 | if eq bad 0 |
| 205 | r = write 1 pv 0 len pv |
| 206 | else |
| 207 | r = write 1 fv 0 len fv |
| 208 | end |
| 209 | if eq m 65 |
| 210 | r = write 1 duptext 0 len duptext |
| 211 | end |
| 212 | if eq m 67 |
| 213 | r = write 1 badjson 0 len badjson |
| 214 | end |
| 215 | if eq m 72 |
| 216 | r = write 1 extra 0 len extra |
| 217 | end |
| 218 | r = write 1 finish 0 len finish |
| 219 | if eq m 66 |
| 220 | r = write 1 garbage 0 len garbage |
| 221 | end |
| 222 | ret 0 |
| 223 | end |