vulkan: skip all-negative-inf blocks in FA#17186
Merged
0cc4m merged 1 commit intoggml-org:masterfrom Nov 15, 2025
Merged
Conversation
Member
|
Curious if you apply this patch, how do the numbers look: diff --git a/ggml/include/ggml.h b/ggml/include/ggml.h
index c1ed1a21c..25916b284 100644
--- a/ggml/include/ggml.h
+++ b/ggml/include/ggml.h
@@ -2220,7 +2220,7 @@ extern "C" {
struct ggml_tensor * a,
int k);
-#define GGML_KQ_MASK_PAD 64
+#define GGML_KQ_MASK_PAD 1
// q: [n_embd_k, n_batch, n_head, ne3 ]
// k: [n_embd_k, n_kv, n_head_kv, ne3 ]
|
Collaborator
Author
Helps for token gen with the sizes used in llama-batched-bench, looks like noise for the smaller sizes used in llama-bench. I only ran the coopmat2 path: |
Collaborator
|
Here are batched bench results from my devices. I used a Llama3 8B Q4_0, because llama-2 KV grows too big (lack of GQA I think). I only did llama-bench when llama-batched-bench looked like a possible regression with b=1. Looks very good. AMD Radeon 8060SBefore:
After:
AMD Radeon Pro VIIBefore:
After:
Nvidia RTX 3090 (coopmat2)Before:
After:
Nvidia RTX 3090 (coopmat1)Before:
After:
Nvidia RTX 3090 (no coopmat)Before:
After:
|
0cc4m
approved these changes
Nov 15, 2025
Anico2
added a commit
to Anico2/llama.cpp
that referenced
this pull request
Jan 15, 2026
blime4
referenced
this pull request
in blime4/llama.cpp
Feb 5, 2026
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.
Fixes #17033. See #17033 (comment).
Overhead for this check generally seems low enough. Perf for just one parallel prompt in llama-batched-bench is a little lower for coopmat2 mode, but I think it's OK. The scalar path is slower due to increased register usage decreasing occupancy. I've filed an internal bug about that, but I'm not too worried about it since I think it only affects Blackwell and the scalar path isn't used for prompt processing on NVIDIA. Would be good to spot check perf on other HW.