From b8feff411fc170de48c592cced8660f9e692db2b Mon Sep 17 00:00:00 2001 From: Pierrick Hymbert Date: Thu, 21 Mar 2024 04:36:06 +0100 Subject: [PATCH] Avoir copying the entire vector Co-authored-by: slaren --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index cd7a7b8d6..a8e6b4208 100644 --- a/llama.cpp +++ b/llama.cpp @@ -5251,7 +5251,7 @@ static bool llm_load_tensors( // load tensor data for (auto & it : ctx_bufs) { ggml_context * ctx = it.first; - std::vector bufs = it.second; + auto & bufs = it.second; if (!ml.load_all_data(ctx, progress_callback, progress_callback_user_data, bufs, use_mlock ? &model.mlock_mmaps : NULL)) { return false; }