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-k5 / README.md

117 lines · 8326 bytes Raw Blame History Source

GB10 kernels k5: causal attention GEMMs (aien-train#52)

After ../gpu-k4/, the attention block was the largest part of the profiled step. The six attention GEMMs ran dense, although half of each product meets only the causal zeros of P (or of DS, whose zeros come from P). This change skips that work at run time through the GEMM argument words. No new kernel ids are added and every non-attention GEMM is unchanged in behaviour.

Every skipped FFMA term is ±0, which predicts a result bit-identical to k4. P above the diagonal is exactly +0 (softf FSELs −inf there). Mode 1 drops a tail of ±0 terms after the real ones. Mode 2 drops a head of ±0 terms from a +0 accumulator, which under round-to-nearest stays +0 (+0 + −0 = +0). The softb row sum sees +0 terms where it saw ±0 terms. The window confirmed the prediction: the checkpoint after 200 steps is byte-equal to k4's.

Status: EXERCISED on one GB10, window 20261102T143009Z-08b44a (win-k5.txt), opened --gb10 shared --quiet none. spark-window printed the verdict "quiet machine", but the quiet lock was not taken and the rung-6 P5 CPU eval held core 7. The load average was 2.55 at open and 3.75 at close (open.json, close.json), so the timings are non-quiet. Not QUALIFIED.

Setup

Results

prediction (prereg.txt)receiptresult
K5 gcmp2 small, 3 steps, rc 0gc2-small-s3-K5.txt GCMP2 PASS rc=0PASS
K5 gcmp2 max, 7 steps, rc 0gc2-max-s7-K5.txt GCMP2 PASS rc=0PASS
K5 gacmp max rc 0ga-max-K5.txt GACMP PASS rc=0PASS
mutant q gcmp2 small FAILgc2-small-s3-KQ.txt GCMP2 FAIL rc=47PASS (caught)
mutant q gcmp2 max FAILgc2-max-s7-KQ.txt GCMP2 FAIL rc=47PASS (caught)
K5 geval of rung 5 ck9000: E 9000 2243 1445466 539226 exactly (gate |Δ| < 10)ge-max-9000-K5.txt E 9000 2243 1445466 539226PASS (Δ 0)
K5 geval of rung 6 ck30000: E 30000 2243 1338156 499194 exactlyge-max-30000-K5.txt E 30000 2243 1338156 499194PASS (Δ 0)
t200 K4 then K5: both rc 0, T 9200 1508182, ck_after equal to each other and to ec4a8c21…t200-K4.txt and t200-K5.txt: T 9200 1508182, ck_after ec4a8c21… bothPASS (byte-equal)
gprof K4 and K5: K5 lower in the attention GEMMsbelowPASS

The byte-equal checkpoint covers 200 full training steps, forward and backward, at the max shape. It is a stronger check than the gcmp2 tolerance: the skipped work is not merely numerically harmless, it changes no bit of the result.

Speed (non-quiet)

t200: 200 gtrainf steps 9000→9200 from rung 6's ck9000, both binaries in this window, K4 first.

binarywallGPU wait (GT field 9)launcheswait per launch
K4, k440.232 s36.398 s638000.5705 ms
K5, this tree37.997 s34.113 s638000.5347 ms

K5 is 1.0588× faster than K4 in wall time (−5.56%) and 1.0670× in GPU wait (WolframLanguageEvaluator: 40232470931/37997016015 → 1.05883, 36397765703/34113356807 → 1.06697, (1 − 37997016015/40232470931)·100 → 5.556). That is 11.18 ms per step (WolframLanguageEvaluator: (40232470931 − 37997016015)/200/10^6 → 11.177). The wait is 89.78% of K5's wall. K4 ran 0.057 s faster here than in the k4 window (40.289 s).

prof-K4.txt and prof-K5.txt (one profiled step each, 383 launches, ns summed per kernel and grid):

idGEMMgridlaunchesk4 msk5 msspeed-up
35S, DP (mode 3, 64 tile)4×4×5121614.04710.4241.348
1o, DQ (mode 1, 32 tile)1×8×5121612.9498.4981.524
0DU, DK (mode 2, 32 tile)1×8×5121611.9728.4301.420

(WolframLanguageEvaluator: 14047121/10424452 → 1.34752, 12949007/8497566 → 1.52385, 11972090/8429740 → 1.42022.) Together these three save 11.616 ms per profiled step, against the 15.838 ms modelled in prereg.txt (WolframLanguageEvaluator: 13.876·6/16 + (12.580 + 11.728)·7/16 → 15.83825). The model assumed time proportional to the tiles run. The measured speed-ups are below the tile ratios (1.6× for mode 3, 16/9 ≈ 1.78× for modes 1 and 2) [INFERENCE: the diagonal blocks still do full work, and in modes 1 and 2 the row tiles become unequal, so the last row tile sets the kernel's length]. The profile total fell from 180.94 ms to 168.54 ms (1.0736×, WolframLanguageEvaluator: 180941593/168543961 → 1.07356). Other kernels moved by up to ±0.6 ms each, which is within the run-to-run spread of one profile [INFERENCE: one profile per binary, no repeat].

Next targets

In prof-K5.txt the attention block (ids 35, 1 and 0 at batch 512, plus the softmax kernels: id 16 grsoftb 14.097 ms and id 15 grsoftf 9.569 ms) totals 51.02 ms, 30.27% of the 168.54 ms profile (WolframLanguageEvaluator: (8497566 + 10424452 + 8429740 + 14096979 + 9568788)/168543961 → 0.30270). The softmax kernels are now the largest part of it. They are next, then fusion.