interplane.Get Omega
Read in your language

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

branch main Branches Tags History

aien-train / evidence / OMEGALLM / gpu-k7 / README.md

122 lines · 7785 bytes Raw Blame History Source

GB10 kernels k7: FFMA operand reuse and a register-bank remap in the GEMMs (aien-train#52)

After ../gpu-k6/ the GEMMs (ids 0-7 32×32, ids 32-39 64×64) held about two thirds of the profiled step. Their FFMAs had two defects that issue order cannot hide:

Two switches in gk.om address them:

Neither switch changes what is computed: the remap renames registers, and reuse and bit 109 are issue hints. Each C element's FFMA chain keeps its operands, order and rounding, so the prediction was bit-identical to K6. The window confirmed it: the checkpoint after 200 steps is byte-equal to K6's.

build.sh gains --variant r0 (OKREU 0, remap only) and --variant b0 (OKBNK 0, reuse only), which run in the same window to attribute the change. Mutant t (OMUTT 0) is unchanged. It drops the k = 7 product of the thread's C element at row 0, column 0, which now lives in R17.

Status: EXERCISED on one GB10, window 20261102T150912Z-072e61 (win-k7.txt), opened --gb10 shared --quiet none. spark-window printed the verdict "quiet machine", but the quiet lock was not taken, and the load average was 2.89 at open and 2.07 at close (open.json, close.json). The timings are therefore non-quiet. Not QUALIFIED.

Setup

Results

GC2 field 14 (gpu_ns) and GA field 7 (adam_ns) are wall times and exempt from equality, as prereg.txt states. Every other field equals the k6 receipts.

prediction (prereg.txt)receiptresult
K7 gcmp2 small, 3 steps, rc 0, K6 linegc2-small-s3-K7.txt GCMP2 PASS rc=0PASS
K7 gcmp2 max, 7 steps, rc 0, K6 linegc2-max-s7-K7.txt GCMP2 PASS rc=0PASS
K7 gacmp max rc 0, K6 linega-max-K7.txt GACMP PASS rc=0PASS
mutant t gcmp2 max FAIL rc 47gc2-max-s7-KT.txt GCMP2 FAIL rc=47, fails 14PASS (caught)
mutant t gcmp2 small, report onlygc2-small-s3-KT.txt GCMP2 FAIL rc=47, fails 14caught
K7 geval of rung 5 ck9000: E 9000 2243 1445466 539226ge-max-9000-K7.txt same linePASS (Δ 0)
K7 geval of rung 6 ck30000: E 30000 2243 1338156 499194ge-max-30000-K7.txt same linePASS (Δ 0)
t200 K6 then K7: rc 0, T 9200 1508182, ck_after ec4a8c21… for botht200-K6.txt, t200-K7.txtPASS (byte-equal)
gprof: K7 GEMM wait below both K6 runs (direction only, not a gate)belowPASS

Speed (non-quiet)

t200: 200 gtrainf steps 9000→9200, K6 first.

binarywallGPU wait (GT field 9)launcheswait per launch
K6, parent35.438 s31.695 s638000.4968 ms
K7, this tree34.260 s30.289 s638000.4748 ms

K7 is 1.0344× faster than K6 in wall time (−3.32%) and 1.0464× in GPU wait. That is 5.89 ms per step, and the wait is 88.41% of K7's wall (WolframLanguageEvaluator: 35437660887/34260371063 → 1.03436, 31694700976/30289445669 → 1.04639, (1 − 34260371063/35437660887)·100 → 3.3221, (35437660887 − 34260371063)/200/10^6 → 5.8864, 30289445669/34260371063 → 0.88410, 31694700976/63800/10^6 → 0.49678, 30289445669/63800/10^6 → 0.47476). K6 ran 0.651 s faster here than in the k6 window (36.089 s).

gprof 3 (one profiled step each, 383 launches; ns summed over each id's launches), in run order K6a, K7, R0, B0, K6b:

binaryids 0-1 (32×32)ids 32-39 (64×64)GEMM totalall ids
K6a1665966994527070111186739162258372
K7 (remap + reuse)1664131885648429102289747151854008
R0 (remap only)1667555692229574108905130158875514
B0 (reuse only)1659536983559436100154805149959265
K6b1634093092019795108360725157781861

Against the mean of K6a and K6b (WolframLanguageEvaluator: Mean[{94527070, 92019795}] → 9.32734×10^7):

Attribution: the gain is reuse plus bit 109, in the 64×64 kernels only. R0 (remap without reuse) is inside the K6 spread, and B0 (reuse without remap) is 2.09 ms below K7 in the 64×64 ids, which is inside the same spread [INFERENCE: one profile per binary]. So the remap has no measured benefit on sm_121 for these kernels. Against K6a, K7 is lower in ids 32 (−3.16 ms), 35 (−2.17), 33 (−1.20), 37 (−0.84) and 36 (−0.61). Id 39 (4.88 ms) lies between K6a (5.78) and K6b (4.78).

Next

The remap is dead weight on this measurement. The next commit removes OKBNK, gkcol and variant b0, which makes the product the reuse-only code, and runs it through its own window with repeated, interleaved profiles (K6, K7, reuse-only). Then comes the 128×128 retile, then fusion.