]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
graph : fix assert in memory-less build_attn (#15590)
authorGeorgi Gerganov <redacted>
Tue, 26 Aug 2025 14:45:17 +0000 (17:45 +0300)
committerGitHub <redacted>
Tue, 26 Aug 2025 14:45:17 +0000 (17:45 +0300)
ggml-ci

src/llama-graph.cpp

index 6419d739bd8a2229bf268cfa565822388ec100bb..b928e9e16ead8c6781b7f5effdd3cb1a79424a85 100644 (file)
@@ -1376,7 +1376,7 @@ ggml_tensor * llm_graph_context::build_attn(
 
     // [TAG_NO_CACHE_PAD]
     // TODO: if ubatch.equal_seqs() == true, we can split the three tensors below into ubatch.n_seqs_unq streams
-    assert(!ubatch.equal_seqs());
+    assert(!ubatch.equal_seqs() || (k_cur->ne[3] == 1 && k_cur->ne[3] == ubatch.n_seqs_unq));
 
     ggml_tensor * q = q_cur;
     ggml_tensor * k = k_cur;