Archived
gemma4k, arch/gemma4: attn_paged_qrow -- q in the fused row only where gemma4k reads it
8772d5b handed the sliding layers' attn_paged q as a column slice of the fused [q|k|v] row. gemma4k reads that; libr4d's paged attention reads q only dense and refuses the slice with RAD_E_STRIDE, which stops the engine at the first step. Under attn_paged the first library in --kernels wins, so the slice was only safe with gemma4k ahead of libr4d -- and the deploy script's default order (libr4d,gemma4k,libavx) took the server down at layer 0's attention on both profile runs. gemma4k now declares the same kernels a second time under attn_paged_qrow: attn_paged's schema field for field, with q read at its own row pitch. Only gemma4k declares it, so it resolves there or nowhere. The sliding layers ask for it once; where it resolves they read q in place (no lift), and where it does not -- a hierarchy without gemma4k, or RADIANCE_GEMMA4_FUSE=0 -- q is lifted into a dense block by a `cast` again and attn_paged reads that, which every attention library takes. The lift's buffer is declared only then, since an unnamed buffer is live for the whole program. A miss is the swa group's first op carrying a block_size, and answers rad_kv_block_size with the RAD_KV_BLOCK it declares, as attn_paged would. No libref row, as the joins. The kernel order still matters for speed -- gemma4k first is the order this model was measured with (ARCHITECTURES.md) -- but no longer for whether the server runs. A startup note says which form was taken. arch_test: the slice reaches attn_paged_qrow and never attn_paged; refused, every sliding layer lifts q for attn_paged; a decode step issues either form; and the three older gemma4 tests count the sliding layers' attention under its new name. docs: OPS.md's row and paragraph (and a line of the joins' text reflowed to the width, as one of gemma4.cpp's), ARCHITECTURES.md's kernel paragraph, which now names expert_scale too, and GUIDE's FUSE row. Not yet run on the cards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e173365823
commit
73c3dc38be
6 files changed
+168
-41
No files matched your search
+1
-1
@@ -1859,7 +1859,7 @@ rad-kbench --home $RADIANCE_HOME --max-cases 1 # are the kernels correct at al
|
||||
| `RADIANCE_PROFILE_EVERY` | with `--profile-ops`, dump the per-op table every N steps (default 32) |
|
||||
| `RADIANCE_LOG_STEPS` | log one line per step: its phase, sequences, and each one's token count and context (§4.5) |
|
||||
| `RADIANCE_G4K_WMMA` | `0` keeps `gemma4k`'s prefill attention on its scalar kernel instead of the WMMA one. An A/B switch and a way out if the matrix path misbehaves on a card; read once |
|
||||
| `RADIANCE_GEMMA4_FUSE` | `0` makes `arch/gemma4` declare the chains instead of `gemma4k`'s fusions: the rmsnorm / add chain for the sandwich joins (`norm_add_norm`, `join_add_scale`), and `embed_lookup` + `mul` for `expert_scale`. An A/B switch; read at declare |
|
||||
| `RADIANCE_GEMMA4_FUSE` | `0` makes `arch/gemma4` declare the chains instead of `gemma4k`'s fusions: the rmsnorm / add chain for the sandwich joins (`norm_add_norm`, `join_add_scale`), `embed_lookup` + `mul` for `expert_scale`, and a `cast` lifting q for `attn_paged` for `attn_paged_qrow`. An A/B switch; read at declare |
|
||||
|
||||
There is also a family of instruments for engine development — `RADIANCE_DEBUG_*` (residual probes,
|
||||
idle scrubs, routing and issue dumps), `RADIANCE_OP_ORACLE*` (named ops checked against `libref` on
|
||||
|
||||
Reference in new issue
Block a user