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

115 lines · 7621 bytes Raw Blame History Source

GB10 kernels k2: 64×64 f32 GEMM tile (aien-train#52)

After ../gpu-k1/, prof-C.txt put 146.07 ms of the profiled step's 232.85 ms GPU wait in the f32 GEMMs, which ran a 32×32 output tile per 64-thread block (4×4 per thread). This change adds a 64×64 tile to gk.om:

Status: EXERCISED on one GB10, window 20261102T133802Z-ff7028 (win-c2-chk1.txt), opened --gb10 shared --quiet none. The quiet lock was not taken: the rung-6 P5 CPU eval held core 7 and the load average was 4.08 at open and 4.04 at close (open.json, close.json), so the timings are non-quiet. prereg.txt names ollm-night as the load; that is out of date, because ollm-night had ended at 13:15Z, before this window opened. Not QUALIFIED.

Setup

Results

prediction (prereg.txt)receiptresult
C2 gcmp2 small, 3 steps, rc 0gc2-small-s3-C2.txt GCMP2 PASS rc=0PASS
C2 gcmp2 max, 7 steps, rc 0gc2-max-s7-C2.txt GCMP2 PASS rc=0, 124.98 sPASS
C2 gacmp max rc 0ga-max-C2.txt GACMP PASS rc=0PASS
mutant t gcmp2 max FAIL rc 47gc2-max-s7-CT.txt GCMP2 FAIL rc=47PASS (caught)
mutant t gcmp2 small, report onlygc2-small-s3-CT.txt GCMP2 FAIL rc=47caught at small too
C2 geval of rung 5 ck9000 = E 9000 2243 1445466 539226ge-max-9000-C2.txtPASS (identical)
C2 geval of rung 6 ck30000 = E 30000 2243 1338156 499194ge-max-30000-C2.txtPASS (identical)
gprof C2 shows ids 32-39 for m, n multiples of 64prof-C2.txt rc=0PASS: all 131 such launches ran 32-39; the 32 launches with n = 32 ran ids 0 and 1
t200 C1 then C2, both rc 0; C2 T line and ck_after equal to C1t200-C1.txt, t200-C2.txt: both T 9200 1507707, both ck_after fde1fae9…PASS (bit-identical checkpoint after 200 steps)

Speed (non-quiet)

t200 as in ../gpu-k1/: 200 gtrainf steps 9000→9200 from rung 6's ck9000, both binaries in this window, C1 first.

binarywallGPU wait (GT field 9)launcheswait per launch
C1, k147.650 s43.840 s638000.6872 ms
C2, this tree44.906 s41.135 s638000.6448 ms

C2 is 1.0611× faster than C1 in wall time (−5.76%) and 1.0658× in GPU wait (WolframLanguageEvaluator: 47.649948632/44.905925594, 43.840489630/41.135334842). Against the softmax-only build A of ../gpu-k1/ (56.862 s, a different window) C2 is 1.2662× (56.862/44.906). The wait is 91.60% of C2's wall. C1 ran 0.458 s faster here than in the k1 window (48.108 s), which is the run-to-run spread at this load.

prof-C2.txt puts 120.59 ms of the profiled step's GPU wait in the GEMMs, against 146.07 ms in ../gpu-k1/prof-C.txt (1.2113×, −17.45%), and 82.71 ms in the row kernels; the GEMMs are now 59.31% of the 203.30 ms profile. Per GEMM shape (sum over the profiled step's launches; TFLOP/s = 2·m·n·k·gz·count over the summed wait, WolframLanguageEvaluator):

m×n×k, gzlaunchesC1 id, msC2 id, msC1 TFLOP/sC2 TFLOP/sspeed-up
256×32×256, 512 (attention, n = 32)320/1, 25.5780/1, 24.3402.6872.8231.051
16384×256×1024, 1163/5, 18.04035/37, 16.7437.6198.2091.077
256×256×32, 512 (attention, k = 32)163, 14.67035, 14.2812.3422.4061.027
16384×1024×256, 1161/3, 18.36933/35, 13.9607.4829.8451.316
16384×256×256, 1403/5/7, 16.00735/37/39, 11.9815.3667.1691.336
1024×256×4096, 4 (split-K)80, 11.70932, 7.6905.8698.9371.523
256×1024×4096, 4 (split-K)80, 11.60332, 6.7875.92310.1261.710
16384×256×256, 381, 6.95833, 6.0447.4078.5271.151
256×256×2048, 24 (split-K)80, 8.10032, 5.5836.3639.2321.451
4096×256×16384, 114, 4.42036, 3.9907.7748.6111.108
16384×256×4096, 111, 3.68433, 3.9799.3278.6360.926
16384×4096×256, 1 (logits)13, 3.98335, 3.2088.62610.7101.242
256×256×1024, 16 (split-K)80, 2.94432, 1.9985.8358.5971.474

One shape got slower: 16384×256×4096 (k = 4096, one launch) takes 0.295 ms more (3.979/3.684 = 1.0800). Its 64×64 grid is 4×256 = 1024 blocks against 8×512 = 4096 for the 32 tile, each block four times longer [INFERENCE: tail of the last wave; not measured]. The two attention batched products (gz 512, k or n = 32) barely moved and run at 2.4-2.8 TFLOP/s.

Next targets

Row kernels in prof-C2.txt (ns summed over the profiled step; ids per gr.om grall):

idkernellaunchesms
11grrmsb RMS norm backward1716.338
16grsoftb softmax backward814.200
21grce cross-entropy113.206
15grsoftf softmax forward89.754
18grew element-wise87.880
10grrmsf RMS norm forward176.022

With the attention batched GEMMs (38.62 ms for ids 0, 1 and 35 at gz 512) these are the next work, then fusion. BF16 tensor cores need a gate decision first: the f64-CPU µnat gates would not hold.