Archived
The first form gave each thread 32 rows by 32 columns in 256 registers and its own 2D loads of the activation: 23-29 TOPS at M = 2048 (probe w4p.cpp), and the probe's breakdown put the time in the activation loads, then the group epilogue (DPAS alone ran 120 TOPS). Now a work-group of 8 threads shares 16 rows: each group's activation is staged in local memory once, double-buffered, a step a 2D load; a thread owns 16 rows by 32 columns in 128 registers (8 threads an EU) and runs the group's epilogue on whole [8 rows][16] blocks against factors broadcast once; for outputs wider than 8192 the work-groups go rows fastest, so one 256-column slice of the weight stays in L2 while every row block uses it. TOPS at M = 2048: gate_up 27 -> 78, N 16384 K 5120 27 -> 75, down 24 -> 62, N 5120 K 6144 29 -> 78. The chain is unchanged: still libref's result bit for bit (XE2_W4_CHECK on the 27B: 0 of 349568, 327680 and 445696 outputs differ). quant_act_i8g for bf16 rows in groups of 128 reads a lane's 8 values in one 16-byte load and stores its 8 codes in one 8-byte store, typed (677 us a call at 2048 x 5120 through the generic accessors); the same floats and rounding: rad-kbench fixture 153/153 and the 27B 96/96, rel_l2 0. Prefill, 2234 tokens: 7.68 -> 5.90 s (378 tok/s). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>