]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : clarify comment about pp and tg graphs [no ci] (#14895)
authorDaniel Bevenius <redacted>
Sun, 27 Jul 2025 10:10:51 +0000 (12:10 +0200)
committerGitHub <redacted>
Sun, 27 Jul 2025 10:10:51 +0000 (12:10 +0200)
* llama : clarify comment about pp and tg graphs [no ci]

This commit clarifies the comment in `llama-context.cpp` regarding the
prefill prompt (pp), and token generation (tg) graphs.

The motivation for this is that I've struggled to remember these and had
to look them up more than once, so I thought it would be helpful to add
a comment that makes it clear what these stand for.

* squash! llama : clarify comment about pp and tg graphs [no ci]

Change "pp" to "prompt processing".

src/llama-context.cpp

index 84f9ccab4ec2f846a350b0cfa99732e507ce3b44..9e77fe6d869599255729b6ed0e908becf8be390d 100644 (file)
@@ -298,7 +298,7 @@ llama_context::llama_context(
 
         cross.v_embd.clear();
 
-        // reserve pp graph first so that buffers are only allocated once
+        // reserve pp (prompt processing) graph first so that buffers are only allocated once
         {
             auto * gf = graph_reserve(n_tokens, n_seqs, n_tokens, mctx.get());
             if (!gf) {
@@ -309,7 +309,7 @@ llama_context::llama_context(
             n_nodes_pp  = ggml_graph_n_nodes(gf);
         }
 
-        // reserve with tg graph to get the number of splits and nodes
+        // reserve with tg (token generation) graph to get the number of splits and nodes
         {
             auto * gf = graph_reserve(n_seqs, n_seqs, n_seqs, mctx.get());
             if (!gf) {