]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
models : fix backend assignment for Granite/Nemotron graphs (#18599)
authorGeorgi Gerganov <redacted>
Mon, 5 Jan 2026 10:34:23 +0000 (12:34 +0200)
committerGitHub <redacted>
Mon, 5 Jan 2026 10:34:23 +0000 (12:34 +0200)
* models : fix backend assignment for Granite/Nemotron graphs

* cont : add ref

* cont : move call to build_inp_embd()

src/llama-graph.cpp

index 6cde7338c27995e48e6a74b4b82502dfb467cd61..86c547263835eb5d508de7fcd2b466ad65248214 100644 (file)
@@ -1326,6 +1326,10 @@ ggml_tensor * llm_graph_context::build_inp_embd(ggml_tensor * tok_embd) const {
 
     res->add_input(std::move(inp));
 
+    // make sure the produced embeddings are immediately materialized in the ggml graph
+    // ref: https://github.com/ggml-org/llama.cpp/pull/18599
+    ggml_build_forward_expand(gf, cur);
+
     return cur;
 }