Decode-shaped MUL_MAT (m=4096, n=1, k=14336) measured via test-backend-ops: ptq1_0 = 602 us (195 GFLOPS), tq2_0 = 109 us (1080), q4_0 = 92 us. Root cause in vulkan-shaders/ptq1_0.glsl: trit accessor uses a 3-way branch + serial base-3 recurrence (v=(v*3)&0xFF loop) per weight element, unhidden at n=1. Prefill (n=512) is fine (4.11 TFLOPS), so only matvec path affected. Fix: 256-entry byte→5-trits LUT, same shape as mul_mat_vec_tq2_0.comp. Correctness currently 28/28 OK, so it's purely a perf bug. Real-world impact: Bonsai-2 27B decode 3.3 tok/s, should be ~20.
Decode-shaped MUL_MAT (m=4096, n=1, k=14336) measured via test-backend-ops: ptq1_0 = 602 us (195 GFLOPS), tq2_0 = 109 us (1080), q4_0 = 92 us. Root cause in vulkan-shaders/ptq1_0.glsl: trit accessor uses a 3-way branch + serial base-3 recurrence (v=(v*3)&0xFF loop) per weight element, unhidden at n=1. Prefill (n=512) is fine (4.11 TFLOPS), so only matvec path affected. Fix: 256-entry byte→5-trits LUT, same shape as mul_mat_vec_tq2_0.comp. Correctness currently 28/28 OK, so it's purely a perf bug. Real-world impact: Bonsai-2 27B decode 3.3 tok/s, should be ~20.