Repository navigation
Conversation
Measured 2026-11-26 on an RTX 4070 (cc 8.9) with llama-bench pp2048, 5 reps x 2 order-swapped passes, against GGML_CUDA_PREFILL_OPT=0: PTQ1_0 prefill +5.9 % (-ub 512) and +8.7 % (-ub 2048). The gain comes from GGML_CUDA_FWHT_MMQ with _GLU (same numbers with only those two switches). Perplexity is identical and 3 chat prompts x 128 greedy tokens are byte-identical. PQ2_0 not measured. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
bri-prism
approved these changes
Nov 26, 2026
bri-prism
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this is a clean one. The table plus the check that the gain comes from GGML_CUDA_FWHT_MMQ with FWHT_MMQ_GLU alone makes the attribution clear, and identical perplexity, byte-identical greedy outputs and a full CUDA test-backend-ops pass cover the "byte-identical" contract this switch promises. PQ2_0 and other Ada cards being unmeasured is fine here since the paths are output-identical, so the worst case is no gain. Approving. Heads-up: this and #310 both touch the FWHT q8 path in ggml-cuda.cu, so whichever lands second may need a quick rebase.
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.
Overview
Turns
GGML_CUDA_PREFILL_OPTon by default for Ada (cc 8.9), as suggested in #445. One line inggml_cuda_prefill_optplus the comment.RTX 4070 (cc 8.9), Ternary-Bonsai-2-27B PTQ1_0, q4_0 K/V,
llama-bench -p 2048 -n 0 -b 2048, 5 reps x 2 order-swapped passes, againstGGML_CUDA_PREFILL_OPT=0:-ubThe gain comes from
GGML_CUDA_FWHT_MMQwithGGML_CUDA_FWHT_MMQ_GLU: setting only those two gave the same numbers (1503.6 / 1456.5 against 1504.2 / 1456.2 withGGML_CUDA_PREFILL_OPT=1, separate run).Additional information
-c 4096 -b 2048 -ub 2048, 4 chunks); 3 chat prompts (2.3k to 3.2k tokens) x 128 greedy tokens byte-identical.test-backend-ops test -b CUDA0on this branch: 21630/21630 passed.Test results
-DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=89.prismatf70247610.Requirements
🤖 Generated with Claude Code