From a83f577c638a80c17916aa7509b4b98092116074 Mon Sep 17 00:00:00 2001 From: Lizonghang <870644199@qq.com> Date: Sat, 2 Nov 2024 20:40:21 +0400 Subject: [PATCH] reset backend_embd and out_embd as input tensors --- src/llama.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llama.cpp b/src/llama.cpp index 1552cc9a..e3b16d21 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -10367,7 +10367,7 @@ struct llm_build_context { const llm_build_cb & cb) { lctx.backend_embd = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, hparams.n_embd, batch.n_tokens); cb(lctx.backend_embd, "backend_embd", -1); - // ggml_set_input(lctx.backend_embd); // set it on the device of the adjacent node + ggml_set_input(lctx.backend_embd); return lctx.backend_embd; } @@ -10378,7 +10378,7 @@ struct llm_build_context { const llm_build_cb & cb) { lctx.out_embd = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, hparams.n_embd, n_outputs); cb(lctx.out_embd, "out_embd", -1); - // ggml_set_input(lctx.out_embd); // set it on the device of the adjacent node + ggml_set_input(lctx.out_embd); return lctx.out_embd; }