Repository navigation
ggml-hrx: claim q8_0 KV-cache views so the q8_0 flash-attention cases run - #123
Merged
bong-water-water-bong merged 1 commit intoOct 21, 2026
Merged
Conversation
…tually tested test-backend-ops asks a backend about the lone VIEW node of a quantized KV cache, and no matcher claims a VIEW, so the whole q8_0 KV attention family was reported unsupported and silently skipped (29 cases). The view is a pure alias: the scheduler resolves it to its storage and the consuming FLASH_ATTN_EXT matcher decides whether it can run, so a VIEW of a q8_0 tensor is now claimed. Proven on hardware (Qwen3-4B, HRX, engine main's gate build): test-backend-ops -b HRX0 -o FLASH_ATTN_EXT -p type_K=q8_0 28/28 passed, Backend HRX0: OK test-backend-ops -b HRX0 -o FLASH_ATTN_EXT -p type_V=q8_0 28/28 passed, Backend HRX0: OK The same change for a 4-bit KV type was tried alongside it and dropped: skipping the graph Hadamard rotation for q8_0 (the way a 4-bit cache skips it because it rotates inside its blocks) raised KLD vs f16 from 0.000172 to 0.000903 on Qwen3-4B at c2048, so q8_0 keeps the graph rotation and that item is not in this commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Salvage from the Hadamard-KV work (Q4_KV itself was rejected by the quality gate and is not included).
Qwen3-4B Q4_K_M decode, f16 vs q8_0 KV: depth 512 75.23 vs 69.64 (-7.4%, was -27%), 2048 -4.6%, 8192 -5.5%. KLD q8_0 vs f16 (4B, c2048): 0.000172 +- 0.000030, unchanged by the routing (bar <= 0.000231). q8_0 FA cases now run and pass vs CPU. Engine main's hw-gate (ops, kat, kld, needle incl. the kq8/kvq8 rows) PASS on the build with both changes. llama.cpp's graph Hadamard rotation for q8_0 is kept (skipping it raised KLD).
🤖 Generated with Claude Code