Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-train/blob/main/evidence/OMEGALLM/gpu-k7b/README.md # aien-train AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-train / evidence / OMEGALLM / gpu-k7b / README.md` 119 lines · 7411 bytes Raw Blame History Rendered 1 # GB10 kernels k7b: the accumulator remap removed, Ra reuse kept (aien-train#52) 2 3 `../gpu-k7/` added two switches to the GEMMs (ids 0-7 32×32, ids 32-39 64×64): Ra operand reuse with 4 control bit 109 (`OKREU`) and an accumulator column remap (`OKBNK`, C column j in accumulator column 5 j xor 1). Its one profile per binary put all the gain on reuse. The remap-only variant r0 fell inside 6 the K6 spread, and the reuse-only variant b0 was at least as fast as both together. k7b removes the 7 remap: 8 9 - `gk.om`: `OKBNK`, `gkcol` and `gkacc32` are gone. `gkfrag` and `gkstep64` index the accumulator as 10 `16 + k` again, the 32×32 epilogue uses `add 16 k`, and `gkacc64` is back to its k6 formula. `gkffma`'s 11 reuse mask, `OKREU`, `gkru` and mutant t (`OMUTT`) are unchanged. 12 - `build.sh`: `--variant b0` is gone. `--variant r0` (`OKREU 0`, the K6 code) remains. 13 14 The product's GPU code is byte-equal to k7's variant b0 at both shapes (`disasm.txt`). It is still a 15 new binary (`50dcd16e`… against b0's `c37449e6`…), so it is gated in its own window. This window also 16 repeats the profiles in three rotated rounds, because k7 had only two K6 runs to estimate the spread. 17 18 Status: EXERCISED on one GB10, window `20261102T151944Z-8e7470` (`win-k7b.txt`), opened 19 `--gb10 shared --quiet none`. `spark-window` printed the verdict "quiet machine", but the quiet lock 20 was not taken, and the load average was 1.64 at open and 2.60 at close (`open.json`, `close.json`). 21 The timings are therefore non-quiet. Not QUALIFIED. 22 23 ## Setup 24 25 - Binaries (`build.txt`): product P `50dcd16e`…, mutant t PT `69724d09`…, omc `2c824805`… (omega-mv 26 `e5b32567`), built from this commit's tree before the window. The same window ran two bases: K6 27 `e49491c5`… (`../gpu-k6/`) and K7a `53ff5f71`…, the parent commit's product (`../gpu-k7/`, `d3d4551`). 28 - Static checks before the window (`prereg.txt`), recorded in `disasm.txt`: 29 - P's 64-slot code is byte-equal to k7 b0's (max shape `cd777d34`…, parity shape `9659b361`…). 30 - This tree with `OKREU 0` is byte-equal to K6's code (max `9646adef`…, parity `ac8e5ff1`…). 31 - P differs from K6 only in slots 0-7 and 32-39. Of their 6464 FFMAs, 5120 print `.reuse`, as in k7. 32 - `prereg.txt` was written at 15:19:37Z and the window opened at 15:19:44Z. `prereg.sha256` (written 33 before the open) hashes it (`726a0ecf`…) and the `run.sh` the window ran (`47444baa`…). In the committed 34 `run.sh`, `win-k7b.txt` and the window JSON the home prefix is replaced by `~/`, so the committed 35 `run.sh` hashes to `efcd1f70`…. Nothing else differs. 36 - Checkpoints are as in `../gpu-k7/`: `gprof` on rung 6's `ck30000` (`8ccaa099`…) and `t200` from 37 rung 6's `ck9000` (`e91349fb`…). 38 39 ## Results 40 41 GC2 field 14 (`gpu_ns`) and GA field 7 (`adam_ns`) are wall times and exempt from equality, as 42 `prereg.txt` states. Every other field equals the k6 and k7 receipts. 43 44 | prediction (`prereg.txt`) | receipt | result | 45 |---|---|---| 46 | P `gcmp2` small, 3 steps, rc 0, K6 line | `gc2-small-s3-P.txt` GCMP2 PASS rc=0 | PASS | 47 | P `gcmp2` max, 7 steps, rc 0, K6 line | `gc2-max-s7-P.txt` GCMP2 PASS rc=0 | PASS | 48 | P `gacmp` max rc 0, K6 line | `ga-max-P.txt` GACMP PASS rc=0 | PASS | 49 | PT `gcmp2` max FAIL rc 47 | `gc2-max-s7-PT.txt` GCMP2 FAIL rc=47, fails 14 | PASS (caught) | 50 | PT `gcmp2` small FAIL rc 47 | `gc2-small-s3-PT.txt` GCMP2 FAIL rc=47, fails 14 | PASS (caught) | 51 | P `geval` of rung 5 `ck9000`: E 9000 2243 `1445466` 539226 | `ge-max-9000-P.txt` same line | PASS (Δ 0) | 52 | P `geval` of rung 6 `ck30000`: E 30000 2243 `1338156` 499194 | `ge-max-30000-P.txt` same line | PASS (Δ 0) | 53 | `t200` K6, K7a, P: rc 0, T 9200 `1508182`, `ck_after` `ec4a8c21`… for all three | `t200-{K6,K7a,P}.txt` | PASS (byte-equal) | 54 | (1) max P GEMM total < min K6 | 105.08 ms < 106.25 ms | holds | 55 | (2) P and K7a GEMM ranges overlap | P 100.30-105.08, K7a 100.23-101.34 ms | holds | 56 57 Neither withdrawal rule fires: the k7 speed claim stands, and the remap removal stays. 58 59 ## Speed (non-quiet) 60 61 `t200`: 200 `gtrainf` steps 9000→9200, in the order K6, K7a, P. 62 63 | binary | wall | GPU wait (GT field 9) | launches | wait per launch | 64 |---|---|---|---|---| 65 | K6 | 35.659 s | 31.883 s | 63800 | 0.4997 ms | 66 | K7a (reuse + remap) | 34.092 s | 30.354 s | 63800 | 0.4758 ms | 67 | P (reuse only) | 34.101 s | 30.371 s | 63800 | 0.4760 ms | 68 69 P is 1.0457× faster than K6 in wall time (−4.37%, 7.79 ms per step) and 1.0498× in GPU wait. P and 70 K7a differ by 9.1 ms over 200 steps (P/K7a 1.00027 wall, 1.00056 wait). Wait is 89.06% of P's wall 71 (WolframLanguageEvaluator: `35659251962`/`34100849240` → 1.04570, `31882952613`/`30371025229` → 1.04978, 72 (1 − `34100849240`/`35659251962`)·100 → 4.3703, (`35659251962` − `34100849240`)/200/10^6 → 7.7920, 73 `34100849240`/`34091751388` → 1.00027, `30371025229`/`30354176610` → 1.00056, 74 `30371025229`/`34100849240` → 0.89062, `30371025229`/63800/10^6 → 0.47603, `30354176610`/63800/10^6 → 0.47577, 75 `31882952613`/63800/10^6 → 0.49973). K6 ran 0.222 s slower here than in the k7 window (35.438 s). 76 77 `gprof 3` (one profiled step each, 383 launches; ns summed over each id's launches), three rounds in 78 rotated order: K6 K7a P / K7a P K6 / P K6 K7a. 79 80 | round | binary | ids 0-1 (32×32) | ids 32-39 (64×64) | GEMM total (0-7, 32-39) | all ids | 81 |---|---|---|---|---|---| 82 | 1 | K6 | `16608254` | `92524427` | `109132681` | `159130652` | 83 | 1 | K7a | `16489434` | `84238132` | `100727566` | `151509448` | 84 | 1 | P | `16624829` | `88450518` | `105075347` | `156016530` | 85 | 2 | K7a | `16357641` | `83870373` | `100228014` | `149839120` | 86 | 2 | P | `16702907` | `83598192` | `100301099` | `149919847` | 87 | 2 | K6 | `16445626` | `89806310` | `106251936` | `155609841` | 88 | 3 | P | `16594781` | `87185470` | `103780251` | `153763841` | 89 | 3 | K6 | `16494715` | `91883344` | `108378059` | `158457842` | 90 | 3 | K7a | `16597755` | `84743951` | `101341706` | `150940521` | 91 92 GEMM total, mean over the three rounds (WolframLanguageEvaluator: Mean of each triple): 93 94 | binary | mean | range / K6 mean | sd | mean / K6 mean | 95 |---|---|---|---|---| 96 | K6 | 107.921 ms | 0.0267 | 1.49 ms | 1 | 97 | K7a | 100.766 ms | 0.0103 | 0.56 ms | 0.93370 | 98 | P | 103.052 ms | 0.0442 | 2.47 ms | 0.95489 | 99 100 - P/K6 per round: 0.9628, 0.9440, 0.9576. 64×64 mean: K7a 0.9221 of K6, P 0.9454. 101 - Ids 0-1 (32×32): all nine profiles lie within 16.36-16.70 ms. Reuse does not move them. 102 - P is the noisiest binary. In round 1, P's ids 32 (21.57 ms) and 35 (33.78 ms) ran at K6 level (K6: 103 21.64-21.81 and 33.18-33.54), and in round 3 they sat between K6 and K7a. In round 2 P equals K7a 104 (100.30 against 100.23 ms). K7a's ids 32 and 35 stayed within 18.62-19.06 and 31.28-31.75 ms in 105 every round. 106 107 Reading: the 200-step run is the decision measure for training speed, and there P equals K7a to 0.03% 108 in wall time. The single-step profile adds a P-only spread in ids 32 and 35 that the remap seemed to 109 damp. Three profiles cannot say whether that spread is a property of the code or of the box 110 [INFERENCE]: 9.1 ms over 200 steps is 45 µs per step, far below the 2.3 ms mean profile gap 111 (WolframLanguageEvaluator: (`34100849240` − `34091751388`)/200/10^3 → 45.489 µs, 112 (`103052232`.333 − `100765762`)/10^6 → 2.2865 ms). Both pre-registered directions hold, so k7b keeps the 113 removal. If a later window shows P's 64×64 spread again, the remap comes back as a measured damper, 114 not as a bank fix. 115 116 ## Next 117 118 The 128×128 retile (256 threads, 8×8 per thread) of the 64×64 GEMMs, then fusion of the softmax into 119 the attention GEMMs.