b70-optimization-lab

Gemma 4 26B Q8: KQ Register/Broadcast No-KQ-LSM Follow-Up

Date: 2026-07-02

Summary

This experiment tested whether the promoted global FlashAttention KQ register/broadcast path still paid an avoidable local-memory allocation cost for the KQ scratch buffer. The candidate added a second default-off flag:

GGML_SYCL_FATTN_DV512_GQA8_KQ_REG_BCAST=1
GGML_SYCL_FATTN_DV512_GQA8_KQ_REG_BCAST_NO_KQ_LSM=1

The first flag is the validated KQ register/broadcast service micro-win. The second flag changed only that path by eliding the unused KQ local-memory region inside the tile kernel. The hypothesis was that reducing declared local memory could improve occupancy or scheduling for the hot Gemma global GQA shape.

Result: no win / noise. The patch built and passed validation, but the balanced four-wave A/B + crossover measured -0.034% mean prefill delta and +0.067% median prefill delta, with mixed wave/GPU behavior. The active source was reverted to the promoted KQ register/broadcast path without the no-KQ-LSM variant.

Source Artifacts

Patch snapshots:

Build result:

Validation

Smoke:

Full A/B + crossover:

Aggregates:

By GPU prefill deltas:

By case prefill deltas:

By wave prefill deltas:

The wave alternation is a strong sign that this candidate is inside normal measurement noise rather than a real structural improvement.

Decision

Decision: closed negative / no-win noise.

Do not promote GGML_SYCL_FATTN_DV512_GQA8_KQ_REG_BCAST_NO_KQ_LSM. The source was reverted to keep only the promoted GGML_SYCL_FATTN_DV512_GQA8_KQ_REG_BCAST path and rebuilt successfully. The reverted active libggml-sycl.so.0.15.2 hash returned to the promoted DKQ576 KQ register/broadcast build: 61c364b690ea6f852ad71c77abd65605c33de967dc9186c19d322c28e4ea8864. Reopen only if a future compiler/kernel layout change makes declared local memory size visibly affect occupancy for this tile.

This is a service/prefill diagnostic result only. It is not a LocalMaxxing headline decode result.